@@ -23,6 +23,10 @@ In the following example the commit ID is "5be7ad..." and the flavour is
2323compiler : ghc-git-5be7ad7861c8d39f60b7101fd8d8e816ff50353a-quick
2424~~~
2525
26+ The [`-j`, `--jobs` option](../configure/global_flags.md#-jobs-or-j-option) at
27+ the command line or the [`jobs`](../configure/yaml/non-project.md#jobs) option
28+ in a YAML configuraton file can be used to specify Hadrian's `-j[<n>]` flag.
29+
2630By default, the code is retrieved from the main GHC repository. If you want to
2731select another repository, use the `compiler-repository` option in a YAML
2832configuration file :
@@ -33,6 +37,40 @@ compiler-repository: git://my/ghc/repository
3337# compiler-repository: https://gitlab.haskell.org/ghc/ghc.git
3438~~~
3539
40+ By default, the Hadrian build target is ` reloc-binary-dist ` on Windows and
41+ ` binary-dist ` on other operating systems. If you want to specify another
42+ Hadrian build target, use the ` compiler-target ` option in a YAML configuration
43+ file:
44+
45+ ~~~ yaml
46+ compiler-target : binary-dist
47+ # default (Windows)
48+ # compiler-target: reloc-binary-dist
49+ # default (non-Windows)
50+ # compiler-target: binary-dist
51+ ~~~
52+
53+ By default, Stack assumes that the path to the binary distribution built by
54+ Hadrian is ` _build/reloc-bindist ` on Windows and ` _build/bindist ` on other
55+ operating systems. If you want to specify another path, use the
56+ ` compiler-bindist-path ` option in a YAML configuration file:
57+
58+ ~~~ yaml
59+ compiler-bindist-path : _build/bindist
60+ # default (Windows)
61+ # compiler-bindist-path: _build/reloc-bindist
62+ # default (non-Windows)
63+ # compiler-bindist-path: _build/bindist
64+ ~~~
65+
66+ !!! note
67+
68+ The Hadrian build target `reloc-binary-dist` was introduced with Git commit
69+ id
70+ [`fe23629b147d419053052e6e881f6e8ddfbf3bae`](https://gitlab.haskell.org/ghc/ghc/-/commit/fe23629b147d419053052e6e881f6e8ddfbf3bae).
71+
72+ Once introduced, the target must be used on Windows.
73+
3674Stack does not check the compiler version when it uses a compiler built from
3775source. It is assumed that the built compiler is recent enough as Stack does not
3876enable any known workaround to make older compilers work.
@@ -65,13 +103,17 @@ fully managed by Stack.
65103 configure: error: GHC version 9.2 or later is required to compile GHC.
66104 ~~~
67105
68- The resolution is: (1) to specify an alternative snapshot (one that
69- specifies a sufficiently recent version of GHC) on the command line, using
70- Stack's option `--snapshot <snapshot>`. Stack will use that snapshot when
71- running GHC's `configure` script; and (2) to set the contents of the `STACK`
72- environment variable to be `stack --snapshot <snapshot>`. Hadrian's
73- `build-stack` script wil refer to that environment variable for the Stack
74- command it uses.
106+ The resolution is:
107+
108+ 1. to specify an alternative snapshot (one that specifies a sufficiently
109+ recent version of GHC) on the command line, using Stack's option
110+ `--snapshot <snapshot>`. Stack will use that snapshot when running GHC's
111+ `configure` script; and
112+
113+ 2. to set the contents of the `STACK` environment variable to be
114+ `stack --snapshot <snapshot>`. If `<snapshot>` is a path to a local YAML
115+ file, it needs to be an absolute one. Hadrian's `build-stack` script
116+ will refer to that environment variable for the Stack command it uses.
75117
76118### Hadrian prerequisites
77119
@@ -127,8 +169,10 @@ Stack will build and install `happy` and `alex`, if not already on the PATH.
127169 # documentation from a single source file, including `makeinfo`.
128170 stack exec -- pacman --sync mingw-w64-x86_64-ca-certificates
129171 # Common CA (certificate authority) certificates.
130- stack exec -- pip install -U sphinx
172+ stack exec -- pacman -sync mingw-w64-x86_64-python- sphinx
131173 # Sphinx is the Python documentation generator.
174+ stack exec -- pacman -sync mingw-w64-x86_64-texlive-full
175+ # The TeX Live distribution.
132176 ~~~
133177
134178 Hadrian may require certain LaTeX packages and may prompt for these to be
0 commit comments