From 9d8cb93ebda1ace9f0d736248dcb0436c9871b65 Mon Sep 17 00:00:00 2001 From: Alina Banerjee Date: Wed, 2 Jun 2021 22:52:14 -0500 Subject: validate: update quick-validate flavour for validation with --fast --- hadrian/src/Settings/Flavours/Quick.hs | 14 +++----------- hadrian/src/Settings/Flavours/Validate.hs | 16 +++++++++++++++- 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 } diff --git a/validate b/validate index 1ac68fb0f8..89dbb42b11 100755 --- a/validate +++ b/validate @@ -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 -- cgit v1.2.1