summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Sandberg Ericsson <adam@sandbergericsson.se>2020-07-04 16:49:57 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-07 13:56:06 -0400
commit9615343363a68313c4bfdb068696002ecca7786e (patch)
treea0d8c7b6a6a5644f7ee71d838fa52892e924f16f
parent0effc57d48ace6b719a9f4cbeac67c95ad55010b (diff)
downloadhaskell-9615343363a68313c4bfdb068696002ecca7786e.tar.gz
hadrian: make hadrian/ghci use the bootstrap compiler from configure #18190
-rw-r--r--configure.ac1
-rw-r--r--hadrian/.gitignore2
-rwxr-xr-xhadrian/ghci-cabal.in (renamed from hadrian/ghci-cabal)4
-rwxr-xr-xhadrian/ghci-stack.in (renamed from hadrian/ghci-stack)4
4 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index a2faecff06..6e710c7f8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1425,6 +1425,7 @@ fi
# Create the configuration for the Hadrian build system if it is present
if test -e hadrian/cfg/system.config.in; then
AC_CONFIG_FILES([hadrian/cfg/system.config])
+ AC_CONFIG_FILES([hadrian/ghci-cabal hadrian/ghci-stack])
fi
# We got caught by
diff --git a/hadrian/.gitignore b/hadrian/.gitignore
index 91e8fb77c8..360b19cbd7 100644
--- a/hadrian/.gitignore
+++ b/hadrian/.gitignore
@@ -1,5 +1,7 @@
# generated by the configure script
cfg/system.config
+/ghci-stack
+/ghci-cabal
# build.bat and build specific
/bin/
diff --git a/hadrian/ghci-cabal b/hadrian/ghci-cabal.in
index 6250ef73f1..2a97b37180 100755
--- a/hadrian/ghci-cabal
+++ b/hadrian/ghci-cabal.in
@@ -1,7 +1,9 @@
#!/usr/bin/env sh
+# This file is generated by configure from ghci-cabal.in
+
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:ghc/Main.hs -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 +RTS -A128m
+@WithGhc@ --interactive $GHC_FLAGS $@ -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 +RTS -A128m
diff --git a/hadrian/ghci-stack b/hadrian/ghci-stack.in
index 9815879a77..ef95552b64 100755
--- a/hadrian/ghci-stack
+++ b/hadrian/ghci-stack.in
@@ -1,7 +1,9 @@
#!/usr/bin/env sh
+# This file is generated by configure from ghci-stack.in
+
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 $HADRIAN_ARGS | tr '\n\r' ' ')"
-stack exec -- ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 +RTS -A128m
+stack exec -- @WithGhc@ --interactive $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 +RTS -A128m