emscripten icon indicating copy to clipboard operation
emscripten copied to clipboard

Option `-Wl,-R` not supported

Open hoodmane opened this issue 7 months ago • 2 comments

The ld docs say that -R is the same as -rpath if the provided path is a directory:

  -R FILE, --just-symbols FILE
                              Just link symbols (if directory, same as --rpath)

But it is a hard error on Emscripten:

$ echo 'int main(){ return 0; }' > a.c
$ gcc -Wl,-R/a/b a.c # works
$ clang -Wl,-R/a/b a.c # works
$ emcc -Wl,-R/a/b a.c # fails
wasm-ld: error: unknown argument: -R/a/b

hoodmane avatar Apr 04 '25 11:04 hoodmane

Should be and easy enough wasm-ld fix if we want to support that. Do maybe users really use that flag instead of -rpath?

sbc100 avatar Apr 08 '25 00:04 sbc100

Would you mind filing a bug instead against wasm-ld in the llvm repo?

sbc100 avatar Apr 08 '25 00:04 sbc100