[Git][ghc/ghc][master] hadrian/ghci: Allow arguments to be passed to GHCi

Marge Bot gitlab at gitlab.haskell.org
Thu Apr 23 15:40:12 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
339e8ece by Ben Gamari at 2020-04-23T11:40:02-04:00
hadrian/ghci: Allow arguments to be passed to 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`.

- - - - -


3 changed files:

- hadrian/ghci
- hadrian/ghci-cabal
- hadrian/ghci-stack


Changes:

=====================================
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" $@)


=====================================
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


=====================================
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



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/339e8ece1c844af5c9165efbc3a928890c2f75c7

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/339e8ece1c844af5c9165efbc3a928890c2f75c7
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200423/51dbb101/attachment-0001.html>


More information about the ghc-commits mailing list