Skip to content

Conversation

@the-horo
Copy link
Contributor

wasm-ld and lld::wasm don't understand the -rpath argument.

wasm-ld and lld::wasm don't understand the -rpath argument.

Signed-off-by: Andrei Horodniceanu <[email protected]>
// -rpath if linking against shared default libs or ldc-jit
if (linkAgainstSharedDefaultLibs() || opts::enableDynamicCompile) {
if ((linkAgainstSharedDefaultLibs() || opts::enableDynamicCompile)
&& !triple.isOSBinFormatWasm()) { // wasm-ld doesn't recognize -rpath
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really needed? wasm will most likely never support shared druntime/Phobos, nor dynamic-compile.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing -link-defaultlib-shared when compiling with -defaultlib= or -betterC still passes -rpath making it fail. + it makes #4848 fail because I no longer strip the -link-defaultlib-shared that comes from -DBUILD_SHARED_LIBS=... in the wasm switches.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course I could add it back but it seems more reasonable to ignore -link-defaultlib-shared, in my opinion at least

@kinke kinke merged commit 9c4e848 into ldc-developers:master Mar 3, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants