Skip to content

Commit

Permalink
Pass ld-options through to GHC. Fixes haskell#4925
Browse files Browse the repository at this point in the history
  • Loading branch information
nh2 committed Jul 20, 2018
1 parent e892df7 commit 8f4c02f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Cabal/Distribution/Simple/GHC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,11 @@ buildOrReplLib mReplFlags verbosity numJobs pkg_descr lbi lib clbi = do
}
linkerOpts = mempty {
ghcOptLinkOptions = PD.ldOptions libBi
++ [ "-static" | withFullyStaticExe lbi ],
++ [ "-static" | withFullyStaticExe lbi ]
-- Pass extra `ld-options` given
-- through to GHC's linker.
++ maybe [] programOverrideArgs
(lookupProgram ldProgram (withPrograms lbi))
ghcOptLinkLibs = extraLibs libBi,
ghcOptLinkLibPath = toNubListR $ extraLibDirs libBi,
ghcOptLinkFrameworks = toNubListR $ PD.frameworks libBi,
Expand Down Expand Up @@ -1292,7 +1296,11 @@ gbuild verbosity numJobs pkg_descr lbi bm clbi = do
}
linkerOpts = mempty {
ghcOptLinkOptions = PD.ldOptions bnfo
++ [ "-static" | withFullyStaticExe lbi ],
++ [ "-static" | withFullyStaticExe lbi ]
-- Pass extra `ld-options` given
-- through to GHC's linker.
++ maybe [] programOverrideArgs
(lookupProgram ldProgram (withPrograms lbi)),
ghcOptLinkLibs = extraLibs bnfo,
ghcOptLinkLibPath = toNubListR $ extraLibDirs bnfo,
ghcOptLinkFrameworks = toNubListR $
Expand Down

0 comments on commit 8f4c02f

Please sign in to comment.