summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Eichmann <EichmannD@gmail.com>2019-03-29 12:30:54 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-04-01 20:13:55 -0400
commitdd9c82ef38e87ede01d81907c5037845f2944435 (patch)
tree0d0fd92ebe21bcdfcbe4b923bb8c0f8298271da2
parent7cf5ba3dba88356571197b470556e888581212d7 (diff)
downloadhaskell-dd9c82ef38e87ede01d81907c5037845f2944435.tar.gz
Hadrian: correct deps for ghc builder.
Previously, when needing ghc as a builder, the ghcDeps (Files the GHC binary depends on) for the current stage were needed. This is incorrect as the previous stage's ghc is used for building. This commit fixes the issue, needing the previous stage's ghcDeps.
-rw-r--r--hadrian/src/Builder.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs
index 1cf2325116..5b8056e139 100644
--- a/hadrian/src/Builder.hs
+++ b/hadrian/src/Builder.hs
@@ -182,8 +182,12 @@ instance H.Builder Builder where
win <- windowsHost
touchyPath <- programPath (vanillaContext Stage0 touchy)
unlitPath <- builderPath Unlit
- ghcdeps <- ghcDeps stage
ghcgens <- generatedGhcDependencies stage
+
+ -- GHC from the previous stage is used to build artifacts in the
+ -- current stage. Need the previous stage's GHC deps.
+ ghcdeps <- ghcDeps (pred stage)
+
return $ [ unlitPath ]
++ ghcdeps
++ ghcgens