[commit: ghc] wip/nfs-locking: Run Make builder with -jN using N = shakeThreads (3de1a5a)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:33:16 UTC 2017


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

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

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

commit 3de1a5a65b7d97635ccd9a14601113b0802cd8f7
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun May 22 01:22:19 2016 +0100

    Run Make builder with -jN using N = shakeThreads


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

3de1a5a65b7d97635ccd9a14601113b0802cd8f7
 src/Settings/Builders/Make.hs | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/Settings/Builders/Make.hs b/src/Settings/Builders/Make.hs
index 6968cd0..3d06775 100644
--- a/src/Settings/Builders/Make.hs
+++ b/src/Settings/Builders/Make.hs
@@ -1,10 +1,14 @@
 module Settings.Builders.Make (makeBuilderArgs) where
 
+import Base
 import Predicate
 import Settings
 
 makeBuilderArgs :: Args
-makeBuilderArgs = mconcat
-    [ builder (Make gmpBuildPath     ) ? arg "MAKEFLAGS="
-    , builder (Make libffiBuildPath  ) ? append ["MAKEFLAGS=", "install"]
-    , builder (Make "testsuite/tests") ? arg "fast" ]
+makeBuilderArgs = do
+    threads <- shakeThreads <$> lift getShakeOptions
+    let j = "-j" ++ show threads
+    mconcat
+        [ builder (Make gmpBuildPath     ) ? append ["MAKEFLAGS=" ++ j]
+        , builder (Make libffiBuildPath  ) ? append ["MAKEFLAGS=" ++ j, "install"]
+        , builder (Make "testsuite/tests") ? arg "fast" ]



More information about the ghc-commits mailing list