Proposal to resolve some confusion about stages in Hadrian
The current situation with hadrian is that
- We build libraries required to build the stage2 compiler with stage1 and place them in
_build/stage1
. - The
stage2
compiler is built withstage1
and then placed in_build/stage1
. - Executables built using the
stage2
compiler such as haddock then also
use the libraries built by the stage1
compiler even though they are being built with the stage2
compiler.
However, this is problematic because when you want to build a stage3
compiler, we want to actually build the libraries again using the stage2
compiler and place them in _build/stage2
. If we follow the existing logic for executables built using the stage2
compiler then in order to build a stage3
compiler we would just reuse all the libraries from _build/stage1
which seems incorrect.
The proposal is simply thus:
- When building an executable at stageN, we use libraries also built at stageN. Concretely, if we want to build
haddock
, a stage2 executable, then we also have to build all the libraries it needs with thestage2
compiler and install them into a package database in_build/stage2
. - The definition of "build" can be configured. By default, in order to "build" a stage2 library we copy it from the stage1 database but it is configurable to rebuild it with the stage2 compiler as we would want to for stage3.
Trac metadata
Trac field | Value |
---|---|
Version | 8.6.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | snowleopard |
Operating system | |
Architecture |