diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-05-11 11:40:17 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-11 23:02:14 -0400 |
commit | 673ff667c98eafc89e6746d1ac69d33b8330d755 (patch) | |
tree | d4afeb52cdb5258cbbec2edf88b4c4ea9453bf7e /hadrian | |
parent | 6967088df9054ee1a00873c1fe0834a98497abf0 (diff) | |
download | haskell-673ff667c98eafc89e6746d1ac69d33b8330d755.tar.gz |
hadrian: Don't always links against libffi
The RTS flag `ffi` is set to either True or False depending on whether
we want to link against `libffi`, therefore in order to work out whether
to add the build tree to the arguments we check whether `ffi` is in the
extraLibs or not before adding the argument.
Fixes #16022
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/src/Settings/Builders/Ghc.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index c3dad6d4d7..1a05681a35 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -124,9 +124,8 @@ ghcLinkArgs = builder (Ghc LinkHs) ? do -- are not actually bundled with the rts. Perhaps ffi should be part of -- rts's extra libraries instead of extra bundled libraries in that -- case. Care should be take as to not break the make build. - rtsFfiArg = package rts ? not useSystemFfi ? mconcat + rtsFfiArg = package rts ? (not useSystemFfi && libffiName' `elem` libs) ? mconcat [ arg ("-L" ++ buildPath) - , arg ("-l" ++ libffiName') ] -- This is the -rpath argument that is required for the bindist scenario |