summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules/Register.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-08-18 21:35:55 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-09-14 17:17:04 -0400
commit98b62871581d09fd7f910f011b8309a342af9886 (patch)
tree52d9259e56ee90a58ba8b5508685379f5900f499 /hadrian/src/Rules/Register.hs
parent7d7e71b03f4b2eb693f5ea69dadbccf491e7403f (diff)
downloadhaskell-98b62871581d09fd7f910f011b8309a342af9886.tar.gz
hadrian: Use a stamp file to record when a package is built in a certain way
Before this patch which library ways we had built wasn't recorded directly. So you would run into issues if you build the .conf file with some library ways before switching the library ways which you wanted to build. Now there is one stamp file for each way, so in order to build a specific way you can need that specific stamp file rather than going indirectly via the .conf file.
Diffstat (limited to 'hadrian/src/Rules/Register.hs')
-rw-r--r--hadrian/src/Rules/Register.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/hadrian/src/Rules/Register.hs b/hadrian/src/Rules/Register.hs
index 64b32283cb..dcd05e240c 100644
--- a/hadrian/src/Rules/Register.hs
+++ b/hadrian/src/Rules/Register.hs
@@ -124,7 +124,7 @@ buildConf _ context@Context {..} _conf = do
need =<< mapM (\pkgId -> packageDbPath stage <&> (-/- pkgId <.> "conf")) depPkgIds
ways <- interpretInContext context (getLibraryWays <> if package == rts then getRtsWays else mempty)
- need =<< concatMapM (libraryTargets True) [ context { way = w } | w <- Set.toList ways ]
+ need =<< mapM pkgStampFile [ context { way = w } | w <- Set.toList ways ]
-- We might need some package-db resource to limit read/write, see packageRules.
path <- buildPath context