diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2019-09-12 23:05:03 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-09-16 13:32:22 -0400 |
commit | b5ae3868db62228e7a75a9f1f66a9b05a4cf3277 (patch) | |
tree | 1386b866bb2e8c2a5fb9afb8f85c52b4cf391096 /validate | |
parent | 7208160d2caae125479e8dd39a263620ea7e0ffe (diff) | |
download | haskell-b5ae3868db62228e7a75a9f1f66a9b05a4cf3277.tar.gz |
Allow validation with Hadrian built with Stack [skip ci]
Diffstat (limited to 'validate')
-rwxr-xr-x | validate | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -26,6 +26,7 @@ Flags: --quiet More pretty build log. See Note [Default build system verbosity]. --hadrian Build the compiler and run the tests through hadrian. + --stack Use Stack to build Hadrian and the Stage 1 compiler. --help shows this usage help. validate runs 'make -j\$THREADS', where by default THREADS is the number of @@ -56,6 +57,7 @@ be_quiet=0 # mk/config.mk.in tar_comp=gzip use_hadrian=NO +use_stack=NO while [ $# -gt 0 ] do @@ -88,6 +90,9 @@ do use_hadrian=YES hadrian_build_root=_validatebuild ;; + --stack) + use_stack=YES + ;; --help) show_help exit 0;; @@ -154,9 +159,19 @@ then $make -C utils/checkUniques else # Just build hadrian. - hadrian/build.sh --help > /dev/null - cd hadrian - hadrian_cmd=$(cabal new-exec -- which hadrian) + if [ "$use_stack" = "NO" ] + then + hadrian/build.sh --help > /dev/null + cd hadrian + hadrian_cmd=$(cabal new-exec -- which hadrian) + else + if [ $no_clean -eq 0 ]; then + rm -rf hadrian/.stack-work + fi + hadrian/build.stack.sh --help > /dev/null + cd hadrian + hadrian_cmd=$(stack exec -- which hadrian) + fi cd .. # TODO: define a hadrian Flavour that mimics # mk/flavours/validate.mk and use it here |