diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-11-12 19:37:07 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2021-11-13 03:04:49 +0000 |
commit | 3273d73addacbddaeb647136a6e8aaee9f8a421b (patch) | |
tree | 359cd8bf4039f5d275a854bc455be506874e5a15 /compiler/GHC/SysTools/BaseDir.hs | |
parent | 4f4e8a6044ebd052e3500530a657bd203c677830 (diff) | |
download | haskell-wip/make-unify-distdirs.tar.gz |
Make: Name GHC according to the stage it is *built* in, not used in.wip/make-unify-distdirs
The basic reason is that is the modular thing to do: where there is one
canonical predecessor stage, there are be many possible successor
stages. It would be arbitrary to just name the newly built GHC after one
of them.
That means we have:
- distdirs decremented: `stage0`, `stage1`, and `stage2`
- prog names decremented: `ghc-stage0`, `ghc-stage1`, `ghc-stage2`
- `Stage1Only` -> `Stage0Only`
- in the test suite, `STAGE<N+>` to `STAGE<N>`
However, `GHC_STAGE0` already meant the GHC used for stage1 -- there was
no missing 0 so we could decrement losslessly. We instead named
`GHC_STAGE<N>` `HC_STAGE<N>` to match `CC_STAGE<N>` and friends (which
are similarly abstractly named) because they are all morally parameters,
not results, and added a comment explaining.
This is very hard to review, but one thing that might help is the fish
one-liner:
```fish
git diff (for x in HEAD^ HEAD; git grep 'stage[0123]' $x | sed -E 's/^HEAD\^?://' | psub; end)
```
Diffstat (limited to 'compiler/GHC/SysTools/BaseDir.hs')
-rw-r--r-- | compiler/GHC/SysTools/BaseDir.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/SysTools/BaseDir.hs b/compiler/GHC/SysTools/BaseDir.hs index 03169523c6..bffa45dad5 100644 --- a/compiler/GHC/SysTools/BaseDir.hs +++ b/compiler/GHC/SysTools/BaseDir.hs @@ -47,7 +47,7 @@ On Windows: - ghc never has a shell wrapper. - we can find the location of the ghc binary, which is $topdir/<foo>/<something>.exe - where <something> may be "ghc", "ghc-stage2", or similar + where <something> may be "ghc", "ghc-stage1", or similar - we strip off the "<foo>/<something>.exe" to leave $topdir. from topdir we can find package.conf, ghc-asm, etc. |