[Git][ghc/ghc][master] Linearise ghc-internal and base build
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Thu Apr 25 15:16:50 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
8a06ddf6 by Matthew Pickering at 2024-04-25T11:16:16-04:00
Linearise ghc-internal and base build
This is achieved by requesting the final package database for
ghc-internal, which mandates it is fully built as a dependency of
configuring the `base` package. This is at the expense of cross-package
parrallelism between ghc-internal and the base package.
Fixes #24436
- - - - -
1 changed file:
- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
Changes:
=====================================
hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
=====================================
@@ -71,6 +71,7 @@ import System.Directory (getCurrentDirectory)
import qualified Distribution.InstalledPackageInfo as CP
import Distribution.Simple.Utils (writeUTF8File)
import Utilities
+import Packages
-- | Parse the Cabal file of a given 'Package'. This operation is cached by the
@@ -150,8 +151,20 @@ configurePackage context at Context {..} = do
-- Stage packages are those we have in this stage.
stagePkgs <- stagePackages stage
+
+
+ -- Normally we will depend on Inplace package databases which enables
+ -- cross-package parallelism, but see #24436 for why we lineariese the build
+ -- of base and ghc-internal.
+ let forceBaseAfterGhcInternal dep =
+ if dep == ghcInternal && package == base
+ then Final
+ else iplace
+
+
+
-- We'll need those packages in our package database.
- deps <- sequence [ pkgConfFile (context { package = pkg })
+ deps <- sequence [ pkgConfFile (context { package = pkg, iplace = forceBaseAfterGhcInternal pkg })
| pkg <- depPkgs, pkg `elem` stagePkgs ]
need $ extraPreConfigureDeps ++ deps
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8a06ddf68bb5a9985e3a7b8464dd04b928c36b90
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8a06ddf68bb5a9985e3a7b8464dd04b928c36b90
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/20240425/8c9ad458/attachment-0001.html>
More information about the ghc-commits
mailing list