diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-03-03 11:30:24 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-03-03 11:35:13 -0500 |
commit | 97e470ebbd80eab865f7c73d241776102bc6b25d (patch) | |
tree | a7c7372a698cdbc5f35e5cc41d8af61e125d58e9 | |
parent | ede60537b9c6827063734312d8068a7d30b89dd5 (diff) | |
download | haskell-wip/T19485.tar.gz |
hadrian: Pass -fno-use-rpaths to GHC while linkingwip/T19485
This mirrors the make build system and ensures that we don't end up with
references to the build directory in the final executable.
Fixes #19485.
-rw-r--r-- | hadrian/src/Settings/Builders/Ghc.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index 3880a99562..29ca57a4f2 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -145,6 +145,10 @@ ghcLinkArgs = builder (Ghc LinkHs) ? do , isProgram pkg ? arg ("-optl-Wl,-rpath," ++ bindistRpath) -- The darwin linker doesn't support/require the -zorigin option , not osxHost ? arg "-optl-Wl,-zorigin" + -- We set RPATH directly (relative to $ORIGIN). There's + -- no reason for GHC to inject further RPATH entries. + -- See #19485. + , arg "-fno-use-rpaths" ] ] , arg "-no-auto-link-packages" |