diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-01-16 07:41:38 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-02-08 10:20:37 -0500 |
commit | 545cf1e184a37295245086040750d77a809db16e (patch) | |
tree | 1fa4ffcb23f108850fa793fa9cab8a79269c3d08 /hadrian/src | |
parent | bec76733b818b0489ffea0834ab6b1560207577c (diff) | |
download | haskell-545cf1e184a37295245086040750d77a809db16e.tar.gz |
hadrian: Depend upon libray dependencies when configuring packages
This will hopefully fix #17631.
Diffstat (limited to 'hadrian/src')
-rw-r--r-- | hadrian/src/Rules/Library.hs-boot | 8 | ||||
-rw-r--r-- | hadrian/src/Rules/Register.hs | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/hadrian/src/Rules/Library.hs-boot b/hadrian/src/Rules/Library.hs-boot new file mode 100644 index 0000000000..d516902c0a --- /dev/null +++ b/hadrian/src/Rules/Library.hs-boot @@ -0,0 +1,8 @@ +module Rules.Library where + +import Base +import Context + +-- Necessary for inter-dependence between Rules.Register and +-- Rules.Library. +needLibrary :: [Context] -> Action () 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 |