summaryrefslogtreecommitdiff
path: root/hadrian/src/Settings/Flavours/Development.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian/src/Settings/Flavours/Development.hs')
-rw-r--r--hadrian/src/Settings/Flavours/Development.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/hadrian/src/Settings/Flavours/Development.hs b/hadrian/src/Settings/Flavours/Development.hs
index 5fcc88be1e..08200dfa5a 100644
--- a/hadrian/src/Settings/Flavours/Development.hs
+++ b/hadrian/src/Settings/Flavours/Development.hs
@@ -2,6 +2,7 @@ module Settings.Flavours.Development (developmentFlavour) where
import Expression
import Flavour
+import Packages
import {-# SOURCE #-} Settings.Default
-- Please update doc/flavours.md when changing this file.
@@ -17,7 +18,10 @@ developmentArgs :: Stage -> Args
developmentArgs ghcStage = do
stage <- getStage
sourceArgs SourceArgs
- { hsDefault = pure ["-O", "-H64m"]
+ { hsDefault = mconcat [ pure ["-O", "-H64m"],
+ -- Disable optimization when building Cabal;
+ -- this saves many minutes of build time.
+ package cabal ? pure ["-O0"]]
, hsLibrary = notStage0 ? arg "-dcore-lint"
, hsCompiler = mconcat [stage0 ? arg "-O2",
succ stage == ghcStage ? pure ["-O0", "-DDEBUG"]]