summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorDavid Eichmann <EichmannD@gmail.com>2019-04-02 10:57:24 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-04-02 12:40:39 -0400
commitf54b5124bd449dd0d818725a5797e7aa9d9e9eba (patch)
tree5d9fc21f8bc1ad50530db22b59a95baaa347b6b4 /hadrian
parent345306d3fa5e84de8b6783c0bc70cf3ba5ecd2b7 (diff)
downloadhaskell-f54b5124bd449dd0d818725a5797e7aa9d9e9eba.tar.gz
Hadrian: traceAllow deep dependencies when compilling haskell object files.
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/src/Rules/Compile.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/hadrian/src/Rules/Compile.hs b/hadrian/src/Rules/Compile.hs
index 0a84e67e90..8bd60dd960 100644
--- a/hadrian/src/Rules/Compile.hs
+++ b/hadrian/src/Rules/Compile.hs
@@ -164,6 +164,16 @@ compileHsObject rs objpath b@(BuildPath _root stage _path _o) hsobj =
(src, deps) <- lookupDependencies (ctxPath -/- ".dependencies") objpath
need (src:deps)
needLibrary =<< contextDependencies ctx
+
+ -- The .dependencies files only lists shallow dependencies. ghc will
+ -- generally read more *.hi and *.hi-boot files (deep dependencies).
+ -- Allow such reads (see https://gitlab.haskell.org/ghc/ghc/wikis/Developing-Hadrian#cloud-shared-cache-build)
+ -- Note that this may allow too many *.hi and *.hi-boot files, but
+ -- calculating the exact set of deep dependencies is not feasible.
+ trackAllow [ "//*." ++ hisuf way
+ , "//*." ++ hibootsuf way
+ ]
+
buildWithResources rs $ target ctx (Ghc CompileHs stage) [src] [objpath]
-- Andrey: It appears that the previous refactoring has broken
-- multiple-output build rules. Ideally, we should bring multiple-output