
#16069: Proposal to resolve some confusion about stages in Hadrian -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The current situation with hadrian is that 1. We build libraries required to build the stage2 compiler with stage1 and place them in `_build/stage1`. 2. The `stage2` compiler is built with `stage1` and then placed in `_build/stage1`. 3. 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: 1. 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 the `stage2` compiler and install them into a package database in `_build/stage2`. 2. 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16069 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler