summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-01-25 15:16:46 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-03-08 15:02:31 -0500
commitf0cf384db038ff3b83770dbf11a89ecd20178899 (patch)
treed7516048e5f310de965dae0ae15c8c68a30d0eb2
parent4eb9d06b00043e52be3cf828ccb92f0bb4c9e438 (diff)
downloadhaskell-f0cf384db038ff3b83770dbf11a89ecd20178899.tar.gz
hadrian: Add +boot_nonmoving_gc flavour transformer
For using GHC bootstrapping to validate the non-moving GC.
-rw-r--r--hadrian/src/Flavour.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs
index 39ef49f11a..79eb18bed4 100644
--- a/hadrian/src/Flavour.hs
+++ b/hadrian/src/Flavour.hs
@@ -65,6 +65,7 @@ flavourTransformers = M.fromList
, "haddock" =: enableHaddock
, "hi_core" =: enableHiCore
, "late_ccs" =: enableLateCCS
+ , "boot_nonmoving_gc" =: enableBootNonmovingGc
]
where (=:) = (,)
@@ -283,6 +284,13 @@ enableAssertions flav = flav { ghcDebugAssertions = f }
f Stage2 = True
f st = ghcDebugAssertions flav st
+-- | Build the stage3 compiler using the non-moving GC.
+enableBootNonmovingGc :: Flavour -> Flavour
+enableBootNonmovingGc = addArgs $ mconcat
+ [ stage Stage2 ? builder Ghc
+ ? pure ["+RTS", "--nonmoving-gc", "-RTS"]
+ ]
+
-- | Produce fully statically-linked executables and build libraries suitable
-- for static linking.
fullyStatic :: Flavour -> Flavour