Squashed 'hadrian/' content from commit 438dc57
[ghc.git] / src / Settings / Builders / Make.hs
1 module Settings.Builders.Make (makeBuilderArgs) where
2
3 import Rules.Gmp
4 import Rules.Libffi
5 import Settings.Builders.Common
6
7 makeBuilderArgs :: Args
8 makeBuilderArgs = do
9 threads <- shakeThreads <$> expr getShakeOptions
10 gmpPath <- expr gmpBuildPath
11 libffiPath <- expr libffiBuildPath
12 let t = show $ max 4 (threads - 2) -- Don't use all Shake's threads
13 mconcat
14 [ builder (Make gmpPath ) ? pure ["MAKEFLAGS=-j" ++ t]
15 , builder (Make libffiPath ) ? pure ["MAKEFLAGS=-j" ++ t, "install"]
16 , builder (Make "testsuite/tests") ? pure ["THREADS=" ++ t, "fast"] ]