summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlina Banerjee <alina@glitchgirl.us>2021-06-02 22:52:14 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-07-27 12:01:15 -0400
commit9d8cb93ebda1ace9f0d736248dcb0436c9871b65 (patch)
tree4c0ae9c9f282437048c8a264c8f5da22bacc640e
parent421110b53cde0f0bd6372ea72d1472e1179bd882 (diff)
downloadhaskell-9d8cb93ebda1ace9f0d736248dcb0436c9871b65.tar.gz
validate: update quick-validate flavour for validation with --fast
-rw-r--r--hadrian/src/Settings/Flavours/Quick.hs14
-rw-r--r--hadrian/src/Settings/Flavours/Validate.hs16
-rwxr-xr-xvalidate18
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