Skip to content

hadrian: Introduce StageBoot for executables needed to build stage0

Matthew Pickering requested to merge wip/bootstrap-9.0.2 into master

The Stage refers to which compiler we will use to perform the builds.

Stage0: Build with the boot toolchain Stage1: Build with compiler built in stage 0 Stage2: Build with compiler built in stage 1

Stage 0 also has two different package databases.

Stage0 GlobalLibs: Used for building build tool dependencies (hsc2hs, unlit, linters etc) Mostly using the libraries from the boot compiler. Stage0 InTreeLibs: Used for building the Stage 1 compiler (ghc executable) and all libraries needed by that.

The reason for this split is

  1. bytestring depends on template-haskell so we need to build bytestring with stage0 (and all packages which depend on it). This includes unix and hence directory (which depends on unix) but unix depends on hsc2hs (which depends on directory) and you get a loop in the build rules if you try to build them all in the same package database. The solution is to build hsc2hs with the global boot libraries in Stage0 GlobalLibs
  2. We want to build linters and other build tools which we don't distribute in a separate package database so they don't end up in the bindist package database.
Edited by Matthew Pickering

Merge request reports