summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-02-17 16:53:35 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-26 15:08:47 -0500
commited03d4e76ead6384e38bb742fee73905d92d1545 (patch)
treef220f9702aa93af492d5e7497ec58013f758acce
parentdef486c90ef6f37d81d0d9c6df754431ff94c6a4 (diff)
downloadhaskell-ed03d4e76ead6384e38bb742fee73905d92d1545.tar.gz
hadrian: Refactor gmp arguments
Move the gmp configuration to its own binding.
-rw-r--r--hadrian/src/Settings/Packages.hs24
1 files changed, 14 insertions, 10 deletions
diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs
index 6e1f8f625f..929dac994f 100644
--- a/hadrian/src/Settings/Packages.hs
+++ b/hadrian/src/Settings/Packages.hs
@@ -146,16 +146,7 @@ packageArgs = do
builder (Cabal Flags) ? arg "in-ghc-tree"
------------------------------ integerGmp ------------------------------
- , package integerGmp ? mconcat
- [ builder (Cabal Setup) ? mconcat
- [ flag GmpInTree ? arg "--configure-option=--with-intree-gmp"
- -- Windows is always built with inplace GMP until we have dynamic
- -- linking working.
- , windowsHost ? arg "--configure-option=--with-intree-gmp"
- , flag GmpFrameworkPref ?
- arg "--configure-option=--with-gmp-framework-preferred"
- ]
- ]
+ , gmpPackageArgs
---------------------------------- rts ---------------------------------
, package rts ? rtsPackageArgs -- RTS deserves a separate function
@@ -178,6 +169,19 @@ packageArgs = do
builder (Cabal Flags) ? notStage0 ? intLib == integerSimple ?
pure ["+integer-simple", "-bytestring-builder"] ]
+gmpPackageArgs :: Args
+gmpPackageArgs = do
+ package integerGmp ? mconcat
+ [ builder (Cabal Setup) ? mconcat
+ [ flag GmpInTree ? arg "--configure-option=--with-intree-gmp"
+ -- Windows is always built with inplace GMP until we have dynamic
+ -- linking working.
+ , windowsHost ? arg "--configure-option=--with-intree-gmp"
+ , flag GmpFrameworkPref ?
+ arg "--configure-option=--with-gmp-framework-preferred"
+ ]
+ ]
+
-- | RTS-specific command line arguments.
rtsPackageArgs :: Args
rtsPackageArgs = package rts ? do