diff options
author | Austin Seipp <austin@well-typed.com> | 2015-05-19 03:57:44 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-05-19 03:57:44 -0500 |
commit | 470a94947b076cb74a6adcbcf9b39057a67e1fba (patch) | |
tree | 0bdd058b38ee54a3d694fb4f4aae8ecb5106e484 /compiler/ghci | |
parent | b199536be25ea046079587933cc73d0a948a0626 (diff) | |
download | haskell-470a94947b076cb74a6adcbcf9b39057a67e1fba.tar.gz |
Revert "In ghci linker, link against all previous temp sos (#10322)"
This reverts commit b0b11ad93cf8470caed572dc16e5cf91304fa355.
It apparently made Harbormaster sad.
Diffstat (limited to 'compiler/ghci')
-rw-r--r-- | compiler/ghci/Linker.hs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs index 3e8423c432..cec09048c2 100644 --- a/compiler/ghci/Linker.hs +++ b/compiler/ghci/Linker.hs @@ -119,9 +119,9 @@ data PersistentLinkerState -- that is really important pkgs_loaded :: ![PackageKey], - -- we need to remember the name of previous temporary DLL/.so - -- libraries so we can link them (see #10322) - temp_sos :: ![(FilePath, String)] } + -- we need to remember the name of the last temporary DLL/.so + -- so we can link it + last_temp_so :: !(Maybe (FilePath, String)) } emptyPLS :: DynFlags -> PersistentLinkerState @@ -131,7 +131,7 @@ emptyPLS _ = PersistentLinkerState { pkgs_loaded = init_pkgs, bcos_loaded = [], objs_loaded = [], - temp_sos = [] } + last_temp_so = Nothing } -- Packages that don't need loading, because the compiler -- shares them with the interpreted program. @@ -841,19 +841,19 @@ dynLoadObjs dflags pls objs = do dflags2 = dflags1 { -- We don't want the original ldInputs in -- (they're already linked in), but we do want - -- to link against previous dynLoadObjs - -- libraries if there were any, so that the linker + -- to link against the previous dynLoadObjs + -- library if there was one, so that the linker -- can resolve dependencies when it loads this -- library. ldInputs = - concatMap - (\(lp, l) -> + case last_temp_so pls of + Nothing -> [] + Just (lp, l) -> [ Option ("-L" ++ lp) , Option ("-Wl,-rpath") , Option ("-Wl," ++ lp) , Option ("-l" ++ l) - ]) - (temp_sos pls), + ], -- Even if we're e.g. profiling, we still want -- the vanilla dynamic libraries, so we set the -- ways / build tag to be just WayDyn. @@ -868,7 +868,7 @@ dynLoadObjs dflags pls objs = do consIORef (filesToNotIntermediateClean dflags) soFile m <- loadDLL soFile case m of - Nothing -> return pls { temp_sos = (libPath, libName) : temp_sos pls } + Nothing -> return pls { last_temp_so = Just (libPath, libName) } Just err -> panic ("Loading temp shared object failed: " ++ err) rmDupLinkables :: [Linkable] -- Already loaded |