[commit: ghc] wip/nfs-locking: Improve needBuilder, see #124. (360a4c3)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:29:37 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/360a4c37f4060254157d19443a3b3c95b8c5b1c7/ghc

>---------------------------------------------------------------

commit 360a4c37f4060254157d19443a3b3c95b8c5b1c7
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Thu Jan 7 09:37:52 2016 +0000

    Improve needBuilder, see #124.


>---------------------------------------------------------------

360a4c37f4060254157d19443a3b3c95b8c5b1c7
 src/Builder.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Builder.hs b/src/Builder.hs
index 5ed9e1d..e4d8221 100644
--- a/src/Builder.hs
+++ b/src/Builder.hs
@@ -106,7 +106,7 @@ specified = fmap (not . null) . builderPath
 -- If 'laxDependencies' is True then we do not rebuild GHC even if it is out of
 -- date (can save a lot of build time when changing GHC).
 needBuilder :: Bool -> Builder -> Action ()
-needBuilder laxDependencies builder = do
+needBuilder laxDependencies builder = whenM (specified builder) $ do
     path <- builderPath builder
     if laxDependencies && allowOrderOnlyDependency builder
     then orderOnly [path]



More information about the ghc-commits mailing list