You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.
We build Stage0 Cabal for ghc-pkg -- results go to _build/stage0/libraries/Cabal.
We also build parts of Cabal for Stage0 ghc-cabal -- results go to _build/stage0/utils/ghc-cabal. We may at some point get rid of ghc-cabal, but there is still a lot of work to be done Get rid of ghc-cabal and package-data.mk #18.
We also build parts of Cabal for Hadrian -- results go to _build/hadrian (we can call this StageH). See Switch to in-tree Cabal library #228 on switching to using in-tree Cabal library.
So we end up building big chunks of Cabal three times in Stage0 + StageH! Presumably, we could only do it once when we use the same GHC both for Stage0 and for StageH (i.e. for compiling Hadrian), which is likely to be the most common case.
The text was updated successfully, but these errors were encountered:
To determine the order in which we need to configure packages (by extracting their dependencies from .cabal files). Make build system sequentialised things with the following hack:
# -------------------------------------------# Note [Dependencies between package-data.mk files].# We cannot run ghc-cabal to configure a package until we have# configured and registered all of its dependencies. So the following# hack forces all the configure steps to happen in exactly the following order:## $(PACKAGES_STAGE1) ghc(stage2) $(PACKAGES_STAGE2)## Ideally we should use the correct dependencies here to allow more# parallelism, but we don't know the dependencies until we've# generated the package-data.mk files.definefixed_pkg_dep
libraries/$1/$2/package-data.mk : $$(fixed_pkg_prev)
fixed_pkg_prev:=libraries/$1/$2/package-data.mk
endefifneq "$(BINDIST)" "YES"
fixed_pkg_prev=
$(foreach pkg,$(PACKAGES_STAGE1),$(eval $(call fixed_pkg_dep,$(pkg),dist-install)))
We no longer build ghc-cabal, so some duplication is gone. I think we can close this issue although there is still some scope for optimisation by sharing the build artefacts of Hadrian and Stage0 Cabal library.
The current state of affairs is very inefficient:
ghc-pkg
-- results go to_build/stage0/libraries/Cabal
.ghc-cabal
-- results go to_build/stage0/utils/ghc-cabal
. We may at some point get rid ofghc-cabal
, but there is still a lot of work to be done Get rid of ghc-cabal and package-data.mk #18._build/hadrian
(we can call this StageH). See Switch to in-tree Cabal library #228 on switching to using in-tree Cabal library.So we end up building big chunks of Cabal three times in Stage0 + StageH! Presumably, we could only do it once when we use the same GHC both for Stage0 and for StageH (i.e. for compiling Hadrian), which is likely to be the most common case.
The text was updated successfully, but these errors were encountered: