diff options
-rw-r--r-- | hadrian/src/Settings/Flavours/Quick.hs | 14 | ||||
-rw-r--r-- | hadrian/src/Settings/Flavours/Validate.hs | 16 | ||||
-rwxr-xr-x | validate | 18 |
3 files changed, 28 insertions, 20 deletions
diff --git a/hadrian/src/Settings/Flavours/Quick.hs b/hadrian/src/Settings/Flavours/Quick.hs index 253202261b..c8ac089335 100644 --- a/hadrian/src/Settings/Flavours/Quick.hs +++ b/hadrian/src/Settings/Flavours/Quick.hs @@ -1,6 +1,5 @@ module Settings.Flavours.Quick ( quickFlavour - , quickValidateFlavour , quickDebugFlavour ) where @@ -29,17 +28,10 @@ quickFlavour = defaultFlavour quickArgs :: Args quickArgs = sourceArgs SourceArgs - { hsDefault = mconcat $ - [ pure ["-O0", "-H64m"] - ] + { hsDefault = mconcat [ pure ["-O0", "-H64m"] ] , hsLibrary = notStage0 ? arg "-O" - , hsCompiler = stage0 ? arg "-O2" - , hsGhc = stage0 ? arg "-O" } - -quickValidateFlavour :: Flavour -quickValidateFlavour = werror $ quickFlavour - { name = "quick-validate" - } + , hsCompiler = stage0 ? arg "-O2" + , hsGhc = stage0 ? arg "-O" } quickDebugFlavour :: Flavour quickDebugFlavour = quickFlavour diff --git a/hadrian/src/Settings/Flavours/Validate.hs b/hadrian/src/Settings/Flavours/Validate.hs index 451291ff1e..79377e83e3 100644 --- a/hadrian/src/Settings/Flavours/Validate.hs +++ b/hadrian/src/Settings/Flavours/Validate.hs @@ -1,4 +1,5 @@ -module Settings.Flavours.Validate (validateFlavour, slowValidateFlavour) where +module Settings.Flavours.Validate (validateFlavour, slowValidateFlavour, + quickValidateFlavour) where import Expression import Flavour @@ -49,3 +50,16 @@ slowValidateArgs = , hsGhc = mempty } ] + +quickValidateArgs :: Args +quickValidateArgs = sourceArgs SourceArgs + { hsDefault = mempty + , hsLibrary = pure [ "-O" ] + , hsCompiler = mconcat [ stage0 ? arg "-O2", notStage0 ? arg "-O"] + , hsGhc = pure [ "-O", "-hide-all-packages" ] + } + +quickValidateFlavour :: Flavour +quickValidateFlavour = werror $ validateFlavour + { name = "quick-validate" + , args = defaultBuilderArgs <> quickValidateArgs <> defaultPackageArgs } @@ -205,9 +205,19 @@ else if [ $be_quiet -eq 0 ]; then hadrian="$hadrian -V" fi + echo "Hadrian command: $hadrian" fi +case $speed in +SLOW) + flavour=slow-validate ;; +NORMAL) + flavour=validate ;; +FAST) + flavour=quick-validate ;; +esac + if [ $build_only -eq 1 ] || { [ $build_only -eq 0 ] && [ $testsuite_only -eq 0 ]; }; then @@ -249,14 +259,6 @@ if [ $build_only -eq 1 ] || $make -j"$threads" else - case $speed in - SLOW) - flavour=slow-validate ;; - NORMAL) - flavour=validate ;; - FAST) - flavour=validate ;; - esac if [ $debugging -eq 1 ]; then hadrian="$hadrian --debug" fi |