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.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/hadrian/src/Settings/Flavours/Development.hs b/hadrian/src/Settings/Flavours/Development.hs
new file mode 100644
index 0000000000..5919026cb0
--- /dev/null
+++ b/hadrian/src/Settings/Flavours/Development.hs
@@ -0,0 +1,20 @@
+module Settings.Flavours.Development (developmentFlavour) where
+
+import Expression
+import Flavour
+import {-# SOURCE #-} Settings.Default
+
+-- Please update doc/flavours.md when changing this file.
+developmentFlavour :: Stage -> Flavour
+developmentFlavour ghcStage = defaultFlavour
+ { name = "devel" ++ show (fromEnum ghcStage)
+ , args = defaultBuilderArgs <> developmentArgs ghcStage <> defaultPackageArgs }
+
+developmentArgs :: Stage -> Args
+developmentArgs ghcStage = do
+ stage <- getStage
+ sourceArgs SourceArgs
+ { hsDefault = pure ["-O", "-H64m"]
+ , hsLibrary = notStage0 ? arg "-dcore-lint"
+ , hsCompiler = succ stage == ghcStage ? pure ["-O0", "-DDEBUG"]
+ , hsGhc = succ stage == ghcStage ? pure ["-O0", "-DDEBUG"] }