diff options
Diffstat (limited to 'hadrian/src/Settings/Packages.hs')
-rw-r--r-- | hadrian/src/Settings/Packages.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs index 4c5407186c..e120e7993c 100644 --- a/hadrian/src/Settings/Packages.hs +++ b/hadrian/src/Settings/Packages.hs @@ -50,7 +50,12 @@ packageArgs = do , builder (Ghc CompileHs) ? mconcat [ inputs ["//GHC.hs", "//GhcMake.hs"] ? arg "-fprof-auto" , 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 [ arg $ "--ghc-option=-DSTAGE=" ++ show (fromEnum stage + 1) @@ -71,7 +76,7 @@ packageArgs = do , ghcProfiled <$> flavour ? notStage0 ? arg "--ghc-pkg-option=--force" ] - , builder (Cabal Flags) ? mconcat + , builder (Cabal Flags) ? mconcat [ ghcWithNativeCodeGen ? arg "ncg" , ghcWithInterpreter ? notStage0 ? arg "ghci" , notStage0 ? not windowsHost ? notM cross ? arg "ext-interp" @@ -172,7 +177,7 @@ packageArgs = do -- in Stage1, and at that point the configuration is just wrong. , package text ? builder (Cabal Flags) ? notStage0 ? intLib == integerSimple ? - pure [ "+integer-simple", "-bytestring-builder"] ] + pure ["+integer-simple", "-bytestring-builder"] ] -- | RTS-specific command line arguments. rtsPackageArgs :: Args |