| ... |
... |
@@ -70,7 +70,8 @@ flavourTransformers = M.fromList |
|
70
|
70
|
, "fully_static" =: fullyStatic
|
|
71
|
71
|
, "host_fully_static" =: hostFullyStatic
|
|
72
|
72
|
, "collect_timings" =: collectTimings
|
|
73
|
|
- , "assertions" =: enableAssertions
|
|
|
73
|
+ , "assertions" =: enableAssertions Stage2
|
|
|
74
|
+ , "assertions_stage1" =: enableAssertions Stage1
|
|
74
|
75
|
, "debug_ghc" =: debugGhc Stage2
|
|
75
|
76
|
, "debug_stage1_ghc" =: debugGhc Stage1
|
|
76
|
77
|
, "lint" =: enableLinting
|
| ... |
... |
@@ -393,12 +394,12 @@ enableLateCCS = addArgs |
|
393
|
394
|
? ((Profiling `wayUnit`) <$> getWay)
|
|
394
|
395
|
? arg "-fprof-late"
|
|
395
|
396
|
|
|
396
|
|
--- | Enable assertions for the stage2 compiler
|
|
397
|
|
-enableAssertions :: Flavour -> Flavour
|
|
398
|
|
-enableAssertions flav = flav { ghcDebugAssertions = f }
|
|
|
397
|
+-- | Enable -DDEBUG assertions in the compiler, at a specified stage
|
|
|
398
|
+enableAssertions :: Stage -> Flavour -> Flavour
|
|
|
399
|
+enableAssertions stage flav = flav { ghcDebugAssertions = f }
|
|
399
|
400
|
where
|
|
400
|
|
- f Stage2 = True
|
|
401
|
|
- f st = ghcDebugAssertions flav st
|
|
|
401
|
+ f s | s == stage = True
|
|
|
402
|
+ | otherwise = ghcDebugAssertions flav s
|
|
402
|
403
|
|
|
403
|
404
|
-- | Build the stage3 compiler using the non-moving GC.
|
|
404
|
405
|
enableBootNonmovingGc :: Flavour -> Flavour
|