summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-06-02 14:39:27 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-07 08:46:41 -0400
commite372331b3212e5d8eddfa6f8d2c3840b7e95c2b3 (patch)
treeb7737a7afc44fab7cf5792c10f90ebc69ab173db /hadrian
parent2dff814158e08aed53036bf6ebd7c3c8394af438 (diff)
downloadhaskell-e372331b3212e5d8eddfa6f8d2c3840b7e95c2b3.tar.gz
hadrian: Add missing deriveConstants dependency on ghcplatform.h
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.
Diffstat (limited to 'hadrian')
-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