summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-06-02 14:39:27 -0400
committerBen Gamari <ben@well-typed.com>2020-06-05 09:32:35 -0400
commitc9ab42547e9c578aca74bcd5198b1e6ac5beafbe (patch)
tree1c08089ea58e3eb2f2ede450d99501b9d59a8d4e
parent2b792facab46f7cdd09d12e79499f4e0dcd4293f (diff)
downloadhaskell-wip/T18290.tar.gz
hadrian: Add missing deriveConstants dependency on ghcplatform.hwip/T18290
deriveConstants wants to compile C sources which #include PosixSource.h, which itself #includes ghcplatform.h. Make sure that Hadrian knows about this dependency. Fixes #18290.
-rw-r--r--hadrian/src/Rules/Generate.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs
index 689e0fdd3f..32d29019a7 100644
--- a/hadrian/src/Rules/Generate.hs
+++ b/hadrian/src/Rules/Generate.hs
@@ -185,6 +185,9 @@ generateRules = do
-- TODO: simplify, get rid of fake rts context
for_ (fst <$> deriveConstantsPairs) $ \constantsFile ->
prefix -/- constantsFile %> \file -> do
+ -- N.B. deriveConstants needs to compile programs which #include
+ -- PosixSource.h, which #include's ghcplatform.h. Fixes #18290.
+ need [prefix -/- "ghcplatform.h"]
withTempDir $ \dir -> build $
target (rtsContext stage) DeriveConstants [] [file, dir]
where