Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • hadrian/doc/flavours.md
    ... ... @@ -297,7 +297,11 @@ The supported transformers are listed below:
    297 297
         </tr>
    
    298 298
         <tr>
    
    299 299
             <td><code>assertions</code></td>
    
    300
    -        <td>Build the stage2 compiler with assertions enabled. </td>
    
    300
    +        <td>Build the stage2 compiler with <code>-DDEBUG</code> assertions enabled. </td>
    
    301
    +    </tr>
    
    302
    +    <tr>
    
    303
    +        <td><code>assertions_stage1</code></td>
    
    304
    +        <td>Build the stage1 compiler with <code>-DDEBUG</code> assertions enabled. </td>
    
    301 305
         </tr>
    
    302 306
         <tr>
    
    303 307
             <td><code>fully_static</code></td>
    

  • hadrian/src/Flavour.hs
    ... ... @@ -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