Skip to content
Snippets Groups Projects
Commit 232002c4 authored by Jess's avatar Jess Committed by Marge Bot
Browse files

Make HsInstances and DynFlags compile with -O0 for Stage0 to speed up Hadrian builds (fixes #16936)

parent 348cc8eb
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,12 @@ packageArgs = do ...@@ -50,7 +50,12 @@ packageArgs = do
, builder (Ghc CompileHs) ? mconcat , builder (Ghc CompileHs) ? mconcat
[ inputs ["//GHC.hs", "//GhcMake.hs"] ? arg "-fprof-auto" [ inputs ["//GHC.hs", "//GhcMake.hs"] ? arg "-fprof-auto"
, input "//Parser.hs" ? , input "//Parser.hs" ?
pure ["-fno-ignore-interface-pragmas", "-fcmm-sink" ] ] pure ["-fno-ignore-interface-pragmas", "-fcmm-sink"]
-- These files take a very long time to compile with -O1,
-- so we use -O0 for them just in Stage0 to speed up the
-- build but not affect Stage1+ executables
, inputs ["//HsInstances.hs", "//DynFlags.hs"] ? stage0 ?
pure ["-O0"] ]
, builder (Cabal Setup) ? mconcat , builder (Cabal Setup) ? mconcat
[ arg $ "--ghc-option=-DSTAGE=" ++ show (fromEnum stage + 1) [ arg $ "--ghc-option=-DSTAGE=" ++ show (fromEnum stage + 1)
...@@ -71,7 +76,7 @@ packageArgs = do ...@@ -71,7 +76,7 @@ packageArgs = do
, ghcProfiled <$> flavour ? , ghcProfiled <$> flavour ?
notStage0 ? arg "--ghc-pkg-option=--force" ] notStage0 ? arg "--ghc-pkg-option=--force" ]
, builder (Cabal Flags) ? mconcat , builder (Cabal Flags) ? mconcat
[ ghcWithNativeCodeGen ? arg "ncg" [ ghcWithNativeCodeGen ? arg "ncg"
, ghcWithInterpreter ? notStage0 ? arg "ghci" , ghcWithInterpreter ? notStage0 ? arg "ghci"
, notStage0 ? not windowsHost ? notM cross ? arg "ext-interp" , notStage0 ? not windowsHost ? notM cross ? arg "ext-interp"
...@@ -172,7 +177,7 @@ packageArgs = do ...@@ -172,7 +177,7 @@ packageArgs = do
-- in Stage1, and at that point the configuration is just wrong. -- in Stage1, and at that point the configuration is just wrong.
, package text ? , package text ?
builder (Cabal Flags) ? notStage0 ? intLib == integerSimple ? builder (Cabal Flags) ? notStage0 ? intLib == integerSimple ?
pure [ "+integer-simple", "-bytestring-builder"] ] pure ["+integer-simple", "-bytestring-builder"] ]
-- | RTS-specific command line arguments. -- | RTS-specific command line arguments.
rtsPackageArgs :: Args rtsPackageArgs :: Args
......
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