[commit: ghc] wip/nfs-locking: Fix inability to find gmp.h when building concurrently (b3bcd0f)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 01:06:47 UTC 2017


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

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

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

commit b3bcd0ffe22fa51b78aa28caf406b7cb74b04ae8
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Fri Jul 22 14:03:07 2016 +0200

    Fix inability to find gmp.h when building concurrently
    
    There were situations when building concurrently when we would
    request `gmp.h` before it had been built (or copied).
    
    This was occuring when we generated the list of dependents for
    the c files in the `integer-gmp` folder. Thus, when generating the
    dependents for this library we now require `gmp.h`.


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

b3bcd0ffe22fa51b78aa28caf406b7cb74b04ae8
 src/Rules/Dependencies.hs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/Rules/Dependencies.hs b/src/Rules/Dependencies.hs
index f78c488..c64a4e6 100644
--- a/src/Rules/Dependencies.hs
+++ b/src/Rules/Dependencies.hs
@@ -11,6 +11,8 @@ import Rules.Actions
 import Settings.Paths
 import Target
 import UserSettings
+import GHC
+
 
 buildPackageDependencies :: [(Resource, Int)] -> Context -> Rules ()
 buildPackageDependencies rs context at Context {..} =
@@ -20,6 +22,7 @@ buildPackageDependencies rs context at Context {..} =
         fmap (path ++)
             [ "//*.c.deps", "//*.cmm.deps", "//*.S.deps" ] |%> \out -> do
                 let src = dep2src context out
+                when (package == integerGmp) (need [gmpLibraryH])
                 need [src]
                 build $ Target context (Cc FindDependencies stage) [src] [out]
 



More information about the ghc-commits mailing list