Reinstallable GHC
This patch allows ghc and its dependencies to be built using a normal invocation of cabal-install. Each componenent which relied on generated files or additional configuration now has a Setup.hs file. There are also various fixes to the cabal files to satisfy cabal-install. There is a new hadrian command which will build a stage2 compiler and then a stage3 compiler by using cabal. ``` ./hadrian/build build-cabal ``` There is also a new CI job which tests running this command. For the 9.4 release we will upload all the dependent executables to hackage and then end users will be free to build GHC and GHC executables via cabal. There are still some unresolved questions about how to ensure soundness when loading plugins into a reinstalled GHC (#20742) which will be tighted up in due course. Fixes #19896
Showing
- .gitignore 1 addition, 0 deletions.gitignore
- .gitlab-ci.yml 16 additions, 0 deletions.gitlab-ci.yml
- .gitlab/ci.sh 54 additions, 28 deletions.gitlab/ci.sh
- cabal.project-reinstall 79 additions, 0 deletionscabal.project-reinstall
- compiler/GHC/Driver/Session.hs 5 additions, 0 deletionscompiler/GHC/Driver/Session.hs
- compiler/Setup.hs 138 additions, 0 deletionscompiler/Setup.hs
- compiler/ghc.cabal.in 15 additions, 3 deletionscompiler/ghc.cabal.in
- configure.ac 5 additions, 0 deletionsconfigure.ac
- driver/ghci/ghci-wrapper.cabal.in 0 additions, 1 deletiondriver/ghci/ghci-wrapper.cabal.in
- ghc/ghc-bin.cabal.in 2 additions, 4 deletionsghc/ghc-bin.cabal.in
- hadrian/cfg/system.config.in 1 addition, 0 deletionshadrian/cfg/system.config.in
- hadrian/hadrian.cabal 2 additions, 0 deletionshadrian/hadrian.cabal
- hadrian/src/Builder.hs 6 additions, 1 deletionhadrian/src/Builder.hs
- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs 4 additions, 0 deletionshadrian/src/Hadrian/Haskell/Cabal/Parse.hs
- hadrian/src/Oracles/TestSettings.hs 8 additions, 0 deletionshadrian/src/Oracles/TestSettings.hs
- hadrian/src/Rules.hs 2 additions, 0 deletionshadrian/src/Rules.hs
- hadrian/src/Rules/CabalReinstall.hs 112 additions, 0 deletionshadrian/src/Rules/CabalReinstall.hs
- hadrian/src/Rules/Generate.hs 1 addition, 0 deletionshadrian/src/Rules/Generate.hs
- hadrian/src/Rules/Test.hs 3 additions, 1 deletionhadrian/src/Rules/Test.hs
- hadrian/src/Settings/Builders/Cabal.hs 90 additions, 16 deletionshadrian/src/Settings/Builders/Cabal.hs
Loading
Please register or sign in to comment