Skip to content
Snippets Groups Projects
Commit c945567c 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 99e266ab
No related branches found
No related tags found
No related merge requests found
...@@ -3785,6 +3785,9 @@ needSourceNotes dflags = debugLevel dflags > 0 ...@@ -3785,6 +3785,9 @@ needSourceNotes dflags = debugLevel dflags > 0
-- | Should we use `-XLinker -rpath` when linking or not? -- | Should we use `-XLinker -rpath` when linking or not?
-- See Note [-fno-use-rpaths] -- See Note [-fno-use-rpaths]
useXLinkerRPath :: DynFlags -> OS -> Bool 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 _ OSDarwin = False -- See Note [Dynamic linking on macOS]
useXLinkerRPath dflags _ = gopt Opt_RPath dflags 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