summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-04-19 18:39:04 -0400
committerBen Gamari <ben@smart-cactus.org>2020-04-20 13:05:37 -0400
commitf6cb3236612a2ebc0da7c61e2b528ab8da6ea630 (patch)
tree2b33f4c6fd1fb8584de052ade795538c8cc3f3e1
parentb43365ad62d73afd5c58467ab9a4f9523ab09c18 (diff)
downloadhaskell-wip/fix-hadrian-ghci.tar.gz
hadrian/ghci: Allow arguments to be passed to GHCiwip/fix-hadrian-ghci
Previously the arguments passed to hadrian/ghci were passed both to `hadrian` and GHCi. This is rather odd given that there are essentially not arguments in the intersection of the two. Let's just pass them to GHCi; this allows `hadrian/ghci -Werror`.
-rwxr-xr-xhadrian/ghci2
-rwxr-xr-xhadrian/ghci-cabal4
-rwxr-xr-xhadrian/ghci-stack2
3 files changed, 4 insertions, 4 deletions
diff --git a/hadrian/ghci b/hadrian/ghci
index b395de4f08..707e87059d 100755
--- a/hadrian/ghci
+++ b/hadrian/ghci
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
# By default on Linux/MacOS we build Hadrian using Cabal
-(. "hadrian/ghci-cabal" "$@")
+(. "hadrian/ghci-cabal" $@)
diff --git a/hadrian/ghci-cabal b/hadrian/ghci-cabal
index 2ee70427c3..28b6cfae01 100755
--- a/hadrian/ghci-cabal
+++ b/hadrian/ghci-cabal
@@ -3,5 +3,5 @@
set -e
# Replace newlines with spaces, as these otherwise break the ghci invocation on windows.
-GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-cabal" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@" | tr '\n\r' ' ')"
-ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m
+GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-cabal" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci $HADRIAN_ARGS | tr '\n\r' ' ')"
+ghci $GHC_FLAGS $@ -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m
diff --git a/hadrian/ghci-stack b/hadrian/ghci-stack
index 92b5229328..53fdeddad5 100755
--- a/hadrian/ghci-stack
+++ b/hadrian/ghci-stack
@@ -3,5 +3,5 @@
set -e
# Replace newlines with spaces, as these otherwise break the ghci invocation on windows.
-GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-stack" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@" | tr '\n\r' ' ')"
+GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-stack" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci $HADRIAN_ARGS | tr '\n\r' ' ')"
stack exec -- ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m