Skip to content
  • Rodrigo Mesquita's avatar
    ghc-toolchain: Toolchain Selection · 31dcd26c
    Rodrigo Mesquita authored and Matthew Pickering's avatar Matthew Pickering committed
    This commit integrates ghc-toolchain, the brand new way of configuring
    toolchains for GHC, with the Hadrian build system, with configure, and
    extends and improves the first iteration of ghc-toolchain.
    
    The general overview is
    
    * We introduce a program invoked `ghc-toolchain --triple=...` which, when run,
      produces a file with a `Target`. A `GHC.Toolchain.Target.Target`
      describes the properties of a target and the toolchain (executables
      and configured flags) to produce code for that target
    
    * Hadrian was modified to read Target files, and will both
      * Invoke the toolchain configured in the Target file as needed
      * Produce a `settings` file for GHC based on the Target file for that stage
    
    * `./configure` will invoke ghc-toolchain to generate target files, but
      it will also generate target files based on the flags configure itself
      configured (through `.in` files that are substituted)
    
      * By default, the Targets generated by configure are still (for now) the ones ...
    31dcd26c