summaryrefslogtreecommitdiff
path: root/hadrian/src/Flavour.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-11-11 14:55:40 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-22 12:39:38 -0500
commit179d0becd2ddfa216f7b221df9fc520a352fdbe7 (patch)
tree9d45057d4c56f3a4af233d000cbe5d4503299dd6 /hadrian/src/Flavour.hs
parentd23fef68415ce6587f77e9530cb0571bb90b31cc (diff)
downloadhaskell-179d0becd2ddfa216f7b221df9fc520a352fdbe7.tar.gz
hadrian: Add a viaLlvmBackend modifier
Note that this also slightly changes the semantics of these flavours as we only use LLVM for >= stage1 builds.
Diffstat (limited to 'hadrian/src/Flavour.hs')
-rw-r--r--hadrian/src/Flavour.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs
index 06f72a06eb..6c68df21ff 100644
--- a/hadrian/src/Flavour.hs
+++ b/hadrian/src/Flavour.hs
@@ -8,6 +8,7 @@ module Flavour
, splitSections, splitSectionsIf
, enableThreadSanitizer
, enableDebugInfo, enableTickyGhc
+ , viaLlvmBackend
) where
import Expression
@@ -84,6 +85,7 @@ flavourTransformers = M.fromList
, "ticky_ghc" =: enableTickyGhc
, "split_sections" =: splitSections
, "thread_sanitizer" =: enableThreadSanitizer
+ , "llvm" =: viaLlvmBackend
]
where (=:) = (,)
@@ -191,3 +193,7 @@ enableThreadSanitizer = addArgs $ mconcat
, builder (Cabal Flags) ? arg "thread-sanitizer"
, builder RunTest ? arg "--config=have_thread_sanitizer=True"
]
+
+-- | Use the LLVM backend in stages 1 and later.
+viaLlvmBackend :: Flavour -> Flavour
+viaLlvmBackend = addArgs $ notStage0 ? builder Ghc ? arg "-fllvm"