-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not pass -lc to the Emscripten linker #131885
Conversation
According to Emscripten maintainer @sbc100, when linking with emcc we shouldn't pass -lc:
|
Hack: drop -lc to work around buggy Emscripten behaviors when -lc is passed. This can be removed when the problems are resolved in Emscripten and we drop support for the currently existing versions of Emscripten. See emscripten-core/emscripten#22758 Unblocks rust-lang#131736
b789570
to
2f6f2b2
Compare
I think a better solution would be to remove the explict |
I am not sure where the |
There are platforms where libc is not even a thing that makes sense to talk about, yes. |
Hm, I think the answer from the Jubilee of 30 minutes ago might have been a bit confused there. |
In that case doesn't it make sense to remove the generic addition of the explicit |
Personally, in interest of getting something merged, I'd prefer we'd start with this change which definitely doesn't affect anyone else. This libc problem has been around for years. It would be nice to fix it so we can enable |
@hoodmane Can you open an issue about "it's kind of weird that we pass |
After a bit more investigation, it turns out that rust/libc specifically asks to pass |
Awesome! That looks like the correct fix! Nice find. |
neat, thanks. |
New PR to rust-lang/libc: |
Closed as superseded by rust-lang/libc#4002. Thanks @sbc100 and @workingjubilee! |
See: emscripten-core/emscripten#22742 emscripten-core/emscripten#16680 rust-lang/rust#98155 rust-lang/rust#98303 rust-lang/rust#131885 (backport <rust-lang#4002>) (cherry picked from commit 66e3665)
Hack: drop -lc to work around buggy Emscripten behaviors when -lc is passed. This can be removed if/when the problems are resolved in Emscripten and we drop support for the currently existing versions of Emscripten. See
emscripten-core/emscripten#22758
Unblocks #131736
This is a repeat of #98303, but the bug we were trying to resolve then went away and this is supposed to work around a different bug.