[Git][ghc/ghc][wip/mo-touch] 8 commits: ghc-toolchain: Initial commit
Krzysztof Gogolewski (@monoidal)
gitlab at gitlab.haskell.org
Tue Jul 25 10:42:28 UTC 2023
Krzysztof Gogolewski pushed to branch wip/mo-touch at Glasgow Haskell Compiler / GHC
Commits:
83cbc672 by Ben Gamari at 2023-07-24T07:40:49+00:00
ghc-toolchain: Initial commit
- - - - -
31dcd26c by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
ghc-toolchain: Toolchain Selection
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 used by Hadrian
* But we additionally validate the Target files generated by
ghc-toolchain against the ones generated by configure, to get a head
start on catching configuration bugs before we transition
completely.
* When we make that transition, we will want to drop a lot of the
toolchain configuration logic from configure, but keep it otherwise.
* For each compiler stage we should have 1 target file (up to a stage compiler we can't run in our machine)
* We just have a HOST target file, which we use as the target for stage0
* And a TARGET target file, which we use for stage1 (and later stages, if not cross compiling)
* Note there is no BUILD target file, because we only support cross compilation where BUILD=HOST
* (for more details on cross-compilation see discussion on !9263)
See also
* Note [How we configure the bundled windows toolchain]
* Note [ghc-toolchain consistency checking]
* Note [ghc-toolchain overview]
Ticket: #19877
MR: !9263
- - - - -
a732b6d3 by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
Add flag to enable/disable ghc-toolchain based configurations
This flag is disabled by default, and we'll use the
configure-generated-toolchains by default until we remove the toolchain
configuration logic from configure.
- - - - -
61eea240 by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
Split ghc-toolchain executable to new packge
In light of #23690, we split the ghc-toolchain executable out of the
library package to be able to ship it in the bindist using Hadrian.
Ideally, we eventually revert this commit.
- - - - -
38e795ff by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
Ship ghc-toolchain in the bindist
Add the ghc-toolchain binary to the binary distribution we ship to
users, and teach the bindist configure to use the existing ghc-toolchain.
- - - - -
32cae784 by Matthew Craven at 2023-07-24T16:48:24-04:00
Kill off gen_bytearray_addr_access_ops.py
The relevant primop descriptions are now
generated directly by genprimopcode.
This makes progress toward fixing #23490, but it is not
a complete fix since there is more than one way in which
cabal-reinstall (hadrian/build build-cabal) is broken.
- - - - -
02e6a6ce by Matthew Pickering at 2023-07-24T16:49:00-04:00
compiler: Remove unused `containers.h` include
Fixes #23712
- - - - -
1e35e981 by Krzysztof Gogolewski at 2023-07-25T12:41:54+02:00
llvm: Restore accidentally deleted code in 0fc5cb97
Fixes #23711
- - - - -
30 changed files:
- − compiler/GHC/Builtin/gen_bytearray_addr_access_ops.py
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Data/Word64Map.hs
- compiler/GHC/Data/Word64Map/Internal.hs
- compiler/GHC/Data/Word64Map/Lazy.hs
- compiler/GHC/Data/Word64Map/Strict.hs
- compiler/GHC/Data/Word64Map/Strict/Internal.hs
- compiler/GHC/Data/Word64Set.hs
- compiler/GHC/Data/Word64Set/Internal.hs
- compiler/GHC/Linker/Static.hs
- compiler/GHC/Platform.hs
- compiler/GHC/Utils/Containers/Internal/BitUtil.hs
- compiler/GHC/Utils/Containers/Internal/StrictPair.hs
- configure.ac
- distrib/configure.ac.in
- hadrian/.gitignore
- hadrian/bindist/Makefile
- hadrian/bindist/config.mk.in
- hadrian/cabal.project
- + hadrian/cfg/default.host.target.in
- + hadrian/cfg/default.target.in
- hadrian/cfg/system.config.in
- hadrian/hadrian.cabal
- hadrian/src/Base.hs
- hadrian/src/Builder.hs
- hadrian/src/Context.hs
- hadrian/src/Flavour.hs
- hadrian/src/Hadrian/Haskell/Hash.hs
- hadrian/src/Hadrian/Oracles/TextFile.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5e0166f9ede913de23a127587b2ddb93920a4cca...1e35e981023a3ca02937cef886ba4371bce58b00
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5e0166f9ede913de23a127587b2ddb93920a4cca...1e35e981023a3ca02937cef886ba4371bce58b00
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230725/a58a6279/attachment.html>
More information about the ghc-commits
mailing list