[commit: ghc] wip/nfs-locking: Don't re-initialise packageConfiguration in Stage2, see #66. (e2fb954)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:20:58 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/e2fb95438402a6a76eff23be687020255a5cc218/ghc
>---------------------------------------------------------------
commit e2fb95438402a6a76eff23be687020255a5cc218
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Thu Dec 31 14:06:07 2015 +0000
Don't re-initialise packageConfiguration in Stage2, see #66.
>---------------------------------------------------------------
e2fb95438402a6a76eff23be687020255a5cc218
src/Base.hs | 4 +++-
src/Rules/Cabal.hs | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/Base.hs b/src/Base.hs
index a127299..6f3b6d6 100644
--- a/src/Base.hs
+++ b/src/Base.hs
@@ -72,9 +72,11 @@ packageConfiguration :: Stage -> FilePath
packageConfiguration Stage0 = "libraries/bootstrapping.conf"
packageConfiguration _ = "inplace/lib/package.conf.d"
+-- StageN, N > 0, share the same packageConfiguration (see above)
packageConfigurationInitialised :: Stage -> FilePath
packageConfigurationInitialised stage =
- shakeFilesPath -/- "package-configuration-initialised-" ++ stageString stage
+ shakeFilesPath -/- "package-configuration-initialised-"
+ ++ stageString (min stage Stage1)
-- Utility functions
-- | Find and replace all occurrences of a value in a list
diff --git a/src/Rules/Cabal.hs b/src/Rules/Cabal.hs
index ab7622c..bf4c8f6 100644
--- a/src/Rules/Cabal.hs
+++ b/src/Rules/Cabal.hs
@@ -42,7 +42,7 @@ cabalRules = do
-- When the file exists, the packageConfiguration has been initialised
-- TODO: get rid of an extra file?
- forM_ [Stage0 ..] $ \stage ->
+ forM_ [Stage0, Stage1] $ \stage ->
packageConfigurationInitialised stage %> \out -> do
let target = PartialTarget stage cabal
pkgConf = packageConfiguration stage
More information about the ghc-commits
mailing list