summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules/Compile.hs
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-10-26 02:36:22 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-18 22:27:55 -0500
commitaed98ddaf72cc38fb570d8415cac5de9d8888818 (patch)
treef25c5a157f27dabbef72b77c5bdc61052ea75c21 /hadrian/src/Rules/Compile.hs
parent0acbbd2021033245c2fb70e8fc8a79fcab168394 (diff)
downloadhaskell-aed98ddaf72cc38fb570d8415cac5de9d8888818.tar.gz
Hadrian: bring up to date with latest make improvements
Headers should be associated with the RTS, and subject to less hacks. The most subtle issue was that the package-grained dependencies on generated files were being `need`ed before calculating Haskell deps, but not before calculating C/C++ deps.
Diffstat (limited to 'hadrian/src/Rules/Compile.hs')
-rw-r--r--hadrian/src/Rules/Compile.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/hadrian/src/Rules/Compile.hs b/hadrian/src/Rules/Compile.hs
index f093d15b96..afa5abbcca 100644
--- a/hadrian/src/Rules/Compile.hs
+++ b/hadrian/src/Rules/Compile.hs
@@ -248,7 +248,10 @@ compileNonHsObject rs lang path = do
-- in the @-MM -MG@ mode and building generated dependencies if they are missing
-- until reaching a fixed point.
needDependencies :: SourceLang -> Context -> FilePath -> FilePath -> Action ()
-needDependencies lang context@Context {..} src depFile = discover
+needDependencies lang context@Context {..} src depFile = do
+ gens <- interpretInContext context generatedDependencies
+ need gens
+ discover
where
discover = do
build $ target context (Cc (FindCDependencies depType) stage) [src] [depFile]