summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2019-09-19 10:46:09 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-20 05:15:52 -0400
commitf257bf735c1c4b7d60f954795c8398a7c51b8cc9 (patch)
tree5a32335a85e9ab11b4c8a451d521ada63c30c287
parent2f8ce45a6f874519cf5a908a7eb0d9633a2389f9 (diff)
downloadhaskell-f257bf735c1c4b7d60f954795c8398a7c51b8cc9.tar.gz
hadrian/ghci.sh: Enable building in parallel
-rw-r--r--hadrian/README.md8
-rwxr-xr-xhadrian/ghci.sh2
2 files changed, 9 insertions, 1 deletions
diff --git a/hadrian/README.md b/hadrian/README.md
index 2a0ffafd4c..bc640cd5de 100644
--- a/hadrian/README.md
+++ b/hadrian/README.md
@@ -183,6 +183,14 @@ which will take 1-2 minutes. Loading GHC into GHCi itself takes about 30 seconds
reloads after that take in the region of 1-5 seconds depending on which modules
need to be recompiled.
+You can further speed up the script by passing `-j` as an argument. This will
+have the effect of passing `-j` to both hadrian and ghci so they will both
+build in parallel.
+
+```
+./hadrian/ghci.sh -j8
+```
+
#### Testing
To run GHC testsuite, use `build test`. See
diff --git a/hadrian/ghci.sh b/hadrian/ghci.sh
index 90727b2d22..e296efa792 100755
--- a/hadrian/ghci.sh
+++ b/hadrian/ghci.sh
@@ -3,4 +3,4 @@
set -e
GHC_FLAGS=$(TERM=dumb CABFLAGS=-v0 "hadrian/build.cabal.sh" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")
-ghci $GHC_FLAGS -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs
+ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m