Emscripten dynamic linking and libc #98155
Labels
A-linkage
Area: linking into static, shared libraries and binaries
C-bug
Category: This is a bug.
O-emscripten
Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL!
O-wasm
Target: WASM (WebAssembly), http://webassembly.org/
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When dynamically linking Emscripten modules, Rust passes
-lc
to Emscripten. This causeswasm-ld: error: unable to find library -lc-debug
. I see that-lc
is coming viaEmLinker.link_dylib
. If I makelink_dylib
into a no-op this fixes the problem, though maybe that has other bad side effects. I am not sure how to filter out libraries that shouldn't be statically linked into a dynamic library. But it would be great to fix this. I am currently using anemcc
linker wrapper that deletes the-lc
argument.@sbc100
xref emscripten-core/emscripten#17191
The text was updated successfully, but these errors were encountered: