summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules/Register.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-01-16 07:41:38 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-08 10:20:37 -0500
commit545cf1e184a37295245086040750d77a809db16e (patch)
tree1fa4ffcb23f108850fa793fa9cab8a79269c3d08 /hadrian/src/Rules/Register.hs
parentbec76733b818b0489ffea0834ab6b1560207577c (diff)
downloadhaskell-545cf1e184a37295245086040750d77a809db16e.tar.gz
hadrian: Depend upon libray dependencies when configuring packages
This will hopefully fix #17631.
Diffstat (limited to 'hadrian/src/Rules/Register.hs')
-rw-r--r--hadrian/src/Rules/Register.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/hadrian/src/Rules/Register.hs b/hadrian/src/Rules/Register.hs
index e9451c2648..e0b0926e6a 100644
--- a/hadrian/src/Rules/Register.hs
+++ b/hadrian/src/Rules/Register.hs
@@ -13,6 +13,7 @@ import Oracles.Setting
import Packages
import Rules.Gmp
import Rules.Rts
+import {-# SOURCE #-} Rules.Library (needLibrary)
import Settings
import Target
import Utilities
@@ -38,7 +39,9 @@ configurePackageRules = do
root -/- "**/setup-config" %> \out -> do
(stage, path) <- parsePath (parseSetupConfig root) "<setup config path parser>" out
let pkg = unsafeFindPackageByPath path
- Cabal.configurePackage (Context stage pkg vanilla)
+ let ctx = Context stage pkg vanilla
+ needLibrary =<< contextDependencies ctx
+ Cabal.configurePackage ctx
root -/- "**/autogen/cabal_macros.h" %> \out -> do
(stage, path) <- parsePath (parseToBuildSubdirectory root) "<cabal macros path parser>" out