Commit 470a9494 authored by Austin Seipp's avatar Austin Seipp

Revert "In ghci linker, link against all previous temp sos (#10322)"

This reverts commit b0b11ad9.

It apparently made Harbormaster sad.
parent b199536b
...@@ -119,9 +119,9 @@ data PersistentLinkerState ...@@ -119,9 +119,9 @@ data PersistentLinkerState
-- that is really important -- that is really important
pkgs_loaded :: ![PackageKey], pkgs_loaded :: ![PackageKey],
-- we need to remember the name of previous temporary DLL/.so -- we need to remember the name of the last temporary DLL/.so
-- libraries so we can link them (see #10322) -- so we can link it
temp_sos :: ![(FilePath, String)] } last_temp_so :: !(Maybe (FilePath, String)) }
emptyPLS :: DynFlags -> PersistentLinkerState emptyPLS :: DynFlags -> PersistentLinkerState
...@@ -131,7 +131,7 @@ emptyPLS _ = PersistentLinkerState { ...@@ -131,7 +131,7 @@ emptyPLS _ = PersistentLinkerState {
pkgs_loaded = init_pkgs, pkgs_loaded = init_pkgs,
bcos_loaded = [], bcos_loaded = [],
objs_loaded = [], objs_loaded = [],
temp_sos = [] } last_temp_so = Nothing }
-- Packages that don't need loading, because the compiler -- Packages that don't need loading, because the compiler
-- shares them with the interpreted program. -- shares them with the interpreted program.
...@@ -841,19 +841,19 @@ dynLoadObjs dflags pls objs = do ...@@ -841,19 +841,19 @@ dynLoadObjs dflags pls objs = do
dflags2 = dflags1 { dflags2 = dflags1 {
-- We don't want the original ldInputs in -- We don't want the original ldInputs in
-- (they're already linked in), but we do want -- (they're already linked in), but we do want
-- to link against previous dynLoadObjs -- to link against the previous dynLoadObjs
-- libraries if there were any, so that the linker -- library if there was one, so that the linker
-- can resolve dependencies when it loads this -- can resolve dependencies when it loads this
-- library. -- library.
ldInputs = ldInputs =
concatMap case last_temp_so pls of
(\(lp, l) -> Nothing -> []
Just (lp, l) ->
[ Option ("-L" ++ lp) [ Option ("-L" ++ lp)
, Option ("-Wl,-rpath") , Option ("-Wl,-rpath")
, Option ("-Wl," ++ lp) , Option ("-Wl," ++ lp)
, Option ("-l" ++ l) , Option ("-l" ++ l)
]) ],
(temp_sos pls),
-- Even if we're e.g. profiling, we still want -- Even if we're e.g. profiling, we still want
-- the vanilla dynamic libraries, so we set the -- the vanilla dynamic libraries, so we set the
-- ways / build tag to be just WayDyn. -- ways / build tag to be just WayDyn.
...@@ -868,7 +868,7 @@ dynLoadObjs dflags pls objs = do ...@@ -868,7 +868,7 @@ dynLoadObjs dflags pls objs = do
consIORef (filesToNotIntermediateClean dflags) soFile consIORef (filesToNotIntermediateClean dflags) soFile
m <- loadDLL soFile m <- loadDLL soFile
case m of 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) Just err -> panic ("Loading temp shared object failed: " ++ err)
rmDupLinkables :: [Linkable] -- Already loaded rmDupLinkables :: [Linkable] -- Already loaded
......
...@@ -218,4 +218,3 @@ test('T10408B', normal, run_command, ...@@ -218,4 +218,3 @@ test('T10408B', normal, run_command,
['$MAKE -s --no-print-directory T10408B']) ['$MAKE -s --no-print-directory T10408B'])
test('T10248', normal, ghci_script, ['T10248.script']) test('T10248', normal, ghci_script, ['T10248.script'])
test('T10110', normal, ghci_script, ['T10110.script']) test('T10110', normal, ghci_script, ['T10110.script'])
test('T10322', normal, ghci_script, ['T10322.script'])
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