Skip to content
Snippets Groups Projects
Commit 6bea1db2 authored by Joachim Breitner's avatar Joachim Breitner
Browse files

Only set rpath on dynamic executables

not static ones. They make no sense there, increase startup time and
may violate some distributions policy on rpaths. This closes #2625.
parent d0529801
No related branches found
No related tags found
No related merge requests found
......@@ -787,7 +787,9 @@ buildOrReplExe forRepl verbosity numJobs _pkg_descr lbi
ghcOptLinkLibPath = toNubListR $ extraLibDirs exeBi,
ghcOptLinkFrameworks = toNubListR $ PD.frameworks exeBi,
ghcOptInputFiles = toNubListR
[exeDir </> x | x <- cObjs],
[exeDir </> x | x <- cObjs]
}
dynLinkerOpts = mempty {
ghcOptRPaths = rpaths
}
replOpts = baseOpts {
......@@ -833,9 +835,9 @@ buildOrReplExe forRepl verbosity numJobs _pkg_descr lbi
| otherwise = doingTH && (withProfExe lbi || withDynExe lbi)
linkOpts = commonOpts `mappend`
linkerOpts `mappend` mempty {
ghcOptLinkNoHsMain = toFlag (not isHaskellMain)
}
linkerOpts `mappend`
mempty { ghcOptLinkNoHsMain = toFlag (not isHaskellMain) } `mappend`
(if withStaticExe then mempty else dynLinkerOpts)
-- Build static/dynamic object files for TH, if needed.
when compileForTH $
......
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