Skip to content
Snippets Groups Projects
Commit afba389f authored by Cheng Shao's avatar Cheng Shao :beach:
Browse files

driver: enforce -fno-use-rpaths for wasm

This commit ensures the GHC driver never passes any RPATH-related
link-time flags on wasm, which is not supported at all.

(cherry picked from commit 649aae00)
parent b11220e0
No related branches found
No related tags found
No related merge requests found
......@@ -3832,6 +3832,9 @@ needSourceNotes dflags = debugLevel dflags > 0
-- | Should we use `-XLinker -rpath` when linking or not?
-- See Note [-fno-use-rpaths]
useXLinkerRPath :: DynFlags -> OS -> Bool
-- wasm shared libs don't have RPATH at all and wasm-ld doesn't accept
-- any RPATH-related flags
useXLinkerRPath dflags _ | ArchWasm32 <- platformArch $ targetPlatform dflags = False
useXLinkerRPath _ OSDarwin = False -- See Note [Dynamic linking on macOS]
useXLinkerRPath dflags _ = gopt Opt_RPath dflags
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment