diff options
-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 |