diff options
author | Ben Gamari <ben@smart-cactus.org> | 2018-11-26 17:21:12 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-03-05 22:22:40 -0500 |
commit | 37f257afcd6a52cf4d76c60d766b1aeb520b9f05 (patch) | |
tree | ac800e46fbf94c16ce39170f4a720637b07dde06 /hadrian/src/Settings | |
parent | 646b6dfbe125aa756a935e840979ba11b4a882c0 (diff) | |
download | haskell-37f257afcd6a52cf4d76c60d766b1aeb520b9f05.tar.gz |
Rip out object splitting
The splitter is an evil Perl script that processes assembler code.
Its job can be done better by the linker's --gc-sections flag. GHC
passes this flag to the linker whenever -split-sections is passed on
the command line.
This is based on @DemiMarie's D2768.
Fixes Trac #11315
Fixes Trac #9832
Fixes Trac #8964
Fixes Trac #8685
Fixes Trac #8629
Diffstat (limited to 'hadrian/src/Settings')
-rw-r--r-- | hadrian/src/Settings/Builders/Ghc.hs | 1 | ||||
-rw-r--r-- | hadrian/src/Settings/Default.hs | 13 | ||||
-rw-r--r-- | hadrian/src/Settings/Default.hs-boot | 3 |
3 files changed, 2 insertions, 15 deletions
diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index 4bc10e5edd..b952a017bc 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -17,7 +17,6 @@ compileAndLinkHs :: Args compileAndLinkHs = (builder (Ghc CompileHs) ||^ builder (Ghc LinkHs)) ? do mconcat [ arg "-Wall" , commonGhcArgs - , splitObjects <$> flavour ? arg "-split-objs" , ghcLinkArgs , defaultGhcWarningsArgs , builder (Ghc CompileHs) ? arg "-c" diff --git a/hadrian/src/Settings/Default.hs b/hadrian/src/Settings/Default.hs index 084dcf3d42..b74ee09499 100644 --- a/hadrian/src/Settings/Default.hs +++ b/hadrian/src/Settings/Default.hs @@ -10,7 +10,7 @@ module Settings.Default ( defaultArgs, -- * Default build flavour - defaultFlavour, defaultSplitObjects + defaultFlavour ) where import qualified Hadrian.Builder.Ar @@ -210,7 +210,6 @@ defaultFlavour = Flavour , integerLibrary = (\x -> if x then integerSimple else integerGmp) <$> cmdIntegerSimple , libraryWays = defaultLibraryWays , rtsWays = defaultRtsWays - , splitObjects = defaultSplitObjects , dynamicGhcPrograms = defaultDynamicGhcPrograms , ghciWithDebugger = False , ghcProfiled = False @@ -228,16 +227,6 @@ defaultDynamicGhcPrograms = do supportsShared <- platformSupportsSharedLibs return (not win && supportsShared) --- | Default condition for building split objects. -defaultSplitObjects :: Predicate -defaultSplitObjects = do - goodStage <- notStage0 -- We don't split bootstrap (stage 0) packages - pkg <- getPackage - supported <- expr supportsSplitObjects - split <- expr cmdSplitObjects - let goodPackage = isLibrary pkg && pkg /= compiler && pkg /= rts - return $ split && goodStage && goodPackage && supported - -- | All 'Builder'-dependent command line arguments. defaultBuilderArgs :: Args defaultBuilderArgs = mconcat diff --git a/hadrian/src/Settings/Default.hs-boot b/hadrian/src/Settings/Default.hs-boot index 30a28497e9..e2996d9c71 100644 --- a/hadrian/src/Settings/Default.hs-boot +++ b/hadrian/src/Settings/Default.hs-boot @@ -1,7 +1,7 @@ module Settings.Default ( SourceArgs (..), sourceArgs, defaultBuilderArgs, defaultPackageArgs, defaultArgs, defaultLibraryWays, defaultRtsWays, - defaultFlavour, defaultSplitObjects + defaultFlavour ) where import Flavour @@ -18,4 +18,3 @@ sourceArgs :: SourceArgs -> Args defaultBuilderArgs, defaultPackageArgs, defaultArgs :: Args defaultLibraryWays, defaultRtsWays :: Ways defaultFlavour :: Flavour -defaultSplitObjects :: Predicate |