diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2018-12-16 08:58:41 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2019-01-09 14:32:21 +0000 |
commit | 6486c6e49c53e75f37ed732b38c5be7ae64785e8 (patch) | |
tree | 187785dd532474cd34aa4e66846b12f28f09f8b9 /hadrian/src/Base.hs | |
parent | 6b70cf611e5ddc475edaa54b893d20990699ddb8 (diff) | |
download | haskell-6486c6e49c53e75f37ed732b38c5be7ae64785e8.tar.gz |
Hadrian: Add support for building stage3
This ticket enables the building of a `stage3` compiler by making the
build logic more consistent and predictable in Hadrian.
Two of the main changes are:
1. In order to build anything at stageN we use the package database
present at stageN. Fixing #16069
2. `haddock` and `ghc-tags` are built
as stage1 executables (with the stage1 compiler) rather than as
stage2 compiler. Fixing
[hadrian#661](https://github.com/snowleopard/hadrian/issues/661)
In order to build a stage3 compiler, you have to set the new `finalStage` hadrian option to `Stage3`.
Diffstat (limited to 'hadrian/src/Base.hs')
-rw-r--r-- | hadrian/src/Base.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hadrian/src/Base.hs b/hadrian/src/Base.hs index 68862ed144..cb0dba06ea 100644 --- a/hadrian/src/Base.hs +++ b/hadrian/src/Base.hs @@ -83,9 +83,9 @@ generatedPath :: Action FilePath generatedPath = buildRoot <&> (-/- generatedDir) -- | Path to the package database for a given build stage, relative to the build --- root. Note that @StageN@, where @N > 1@, uses the 'Stage1' package database. +-- root. relativePackageDbPath :: Stage -> FilePath -relativePackageDbPath stage = stageString (min stage Stage1) -/- "lib/package.conf.d" +relativePackageDbPath stage = stageString stage -/- "lib/package.conf.d" -- | Path to the package database used in a given 'Stage', including -- the build root. |