Commit 9a2798e1 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot
Browse files

hadrian: Add `validate` and `slow validate` flavours

parent 77ca39e3
......@@ -120,6 +120,28 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
<td></td>
<td>-O0<br>-DDEBUG</td>
</tr>
<tr>
<th>validate</td>
<td>-O0<br>-H64m</td>
<td>-fllvm-fill-undef-with-garbage</td>
<td></td>
<td>-O<br>-dcore-lint<br>-dno-debug-output</td>
<td>-O2<br>-DDEBUG</td>
<td>-O<br>-dcore-lint<br>-dno-debug-output</td>
<td>-O</td>
<td>-O</td>
</tr>
<tr>
<th>validate</td>
<td>-O0<br>-H64m</td>
<td>-fllvm-fill-undef-with-garbage</td>
<td></td>
<td>-O<br>-dcore-lint<br>-dno-debug-output</td>
<td>-O2<br>-DDEBUG</td>
<td>-O<br>-DDEBUG<br>-dcore-lint<br>-dno-debug-output</td>
<td>-O</td>
<td>-O</td>
</tr>
</table>
### LLVM variants
......
......@@ -101,6 +101,7 @@ executable hadrian
, Settings.Flavours.QuickCross
, Settings.Flavours.Quickest
, Settings.Flavours.GhcInGhci
, Settings.Flavours.Validate
, Settings.Packages
, Settings.Parser
, Settings.Program
......
......@@ -21,6 +21,7 @@ import Settings.Flavours.Quick
import Settings.Flavours.Quickest
import Settings.Flavours.QuickCross
import Settings.Flavours.GhcInGhci
import Settings.Flavours.Validate
import Control.Monad.Except
import Data.Either
......@@ -45,7 +46,7 @@ hadrianFlavours =
, developmentFlavour Stage2, performanceFlavour, profiledFlavour
, quickFlavour, quickestFlavour, quickCrossFlavour, benchmarkLlvmFlavour
, performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour
, ghcInGhciFlavour ]
, ghcInGhciFlavour, validateFlavour, slowValidateFlavour ]
-- | This action looks up a flavour with the name given on the
-- command line with @--flavour@, defaulting to 'userDefaultFlavour'
......
module Settings.Flavours.Validate (validateFlavour, slowValidateFlavour) where
import Expression
import Flavour
import Oracles.Flag
import {-# SOURCE #-} Settings.Default
-- Please update doc/flavours.md when changing this file.
validateFlavour :: Flavour
validateFlavour = werror $ defaultFlavour
{ name = "validate"
, args = defaultBuilderArgs <> validateArgs <> defaultPackageArgs
, libraryWays = mconcat [ pure [vanilla]
, notStage0 ? platformSupportsSharedLibs ? pure [dynamic]
]
, rtsWays = mconcat [ pure [vanilla, threaded, debug, logging, threadedDebug, threadedLogging]
, notStage0 ? platformSupportsSharedLibs ? pure
[ dynamic, threadedDynamic, debugDynamic, threadedDebugDynamic
, loggingDynamic, threadedLoggingDynamic
]
]
}
validateArgs :: Args
validateArgs = sourceArgs SourceArgs
{ hsDefault = mconcat [ stage0 ? pure ["-O0", "-H64m"]
-- See #11487
, notStage0 ? arg "-fllvm-fill-undef-with-garbage"
]
, hsLibrary = pure ["-O", "-dcore-lint", "-dno-debug-output"]
, hsCompiler = mconcat [ stage0 ? pure ["-O2", "-DDEBUG"]
, notStage0 ? pure ["-O", "-dcore-lint", "-dno-debug-output"]
]
, hsGhc = pure ["-O"] }
slowValidateFlavour :: Flavour
slowValidateFlavour = werror $ validateFlavour
{ name = "slow-validate"
, args = defaultBuilderArgs <> slowValidateArgs <> defaultPackageArgs
}
slowValidateArgs :: Args
slowValidateArgs =
mconcat [ validateArgs
, notStage0 ? arg "-DDEBUG"
]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment