summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-12-07 11:13:20 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2023-01-04 11:58:42 +0000
commit32e264c1a11e6356bb045371b87a3736df19e792 (patch)
tree4563b936dc6c6971c9aa4f4cc39247543955bbe3
parent53a6ae7a8f819d1105aa190dc9cce215cdbcc6dc (diff)
downloadhaskell-32e264c1a11e6356bb045371b87a3736df19e792.tar.gz
hadrian: Document using GHC environment variable to select boot compiler
Fixes #22340
-rw-r--r--hadrian/README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/hadrian/README.md b/hadrian/README.md
index 0be3546a67..c01f806a8e 100644
--- a/hadrian/README.md
+++ b/hadrian/README.md
@@ -164,6 +164,18 @@ build stage2:lib:text
build stage1:exe:haddock
```
+#### Choosing the compiler used to build Hadrian
+
+The `GHC` environment variable can be used to control which GHC is used to build hadrian. By
+default the version of GHC on your path is used to build hadrian.
+This can be a different version of GHC to the one you want to use as the boot compiler (which
+is selected during ./configure).
+
+```
+GHC=$(which ghc-9.4.2) ./hadrian/build
+-- hadrian is built using ghc-9.4.2
+```
+
#### Fast feedback using ghci
Running the `./hadrian/ghci` script will load the main compiler into