Commit aa0168b9 authored by Christiaan Baaij's avatar Christiaan Baaij
Browse files

Cabal handles RPATHs on supported platform.

Before, RPATH handling was left to GHC. But this causes problems
when a package contains both a Library section and an Executable
section which depends on the library, and the executable is
dynamically linked. See e.g. #1568
parent 649cffc1
......@@ -1122,8 +1122,8 @@ buildOrReplExe forRepl verbosity numJobs _pkg_descr lbi
getRPaths :: LocalBuildInfo
-> ComponentLocalBuildInfo -- ^ Component we are building
-> IO (NubListR FilePath)
getRPaths lbi clbi | relocatable lbi && supportRPaths hostOS = do
libraryPaths <- depLibraryPaths False True lbi clbi
getRPaths lbi clbi | supportRPaths hostOS = do
libraryPaths <- depLibraryPaths False (relocatable lbi) lbi clbi
let hostPref = case hostOS of
OSX -> "@loader_path"
_ -> "$ORIGIN"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment