diff options
author | Adam Sandberg Ericsson <adam@sandbergericsson.se> | 2021-03-24 16:38:47 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-26 23:02:52 -0400 |
commit | c83e4d05646c6c7b0396c4b984c201faf5c62fda (patch) | |
tree | 6fd2032b9cf6b8b4feddad77d884947d74779b52 /hadrian | |
parent | 57d21e6a522f5522ba238675e74f510ab8e5d300 (diff) | |
download | haskell-c83e4d05646c6c7b0396c4b984c201faf5c62fda.tar.gz |
hadrian: build ghc-stageN wrapper when building the stageN:exe:ghc-bin target
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/src/Rules/SimpleTargets.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hadrian/src/Rules/SimpleTargets.hs b/hadrian/src/Rules/SimpleTargets.hs index 1ce3418665..e6c42907de 100644 --- a/hadrian/src/Rules/SimpleTargets.hs +++ b/hadrian/src/Rules/SimpleTargets.hs @@ -29,10 +29,16 @@ simplePackageTargets = traverse_ simpleTarget targets simpleTarget :: (Stage, Package) -> Rules () simpleTarget (stage, target) = do + root <- buildRootRules + let tgt = intercalate ":" [stagestr, typ, pkgname] tgt ~> do p <- getTargetPath stage target need [ p ] + -- build the _build/ghc-stageN wrappers if this is the ghc package + if target == Packages.ghc + then need [ root -/- ("ghc-" <> stagestr) ] + else pure () where typ = if isLibrary target then "lib" else "exe" stagestr = stageString stage |