diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-02-17 16:53:35 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-02-19 00:21:35 -0500 |
commit | 36d6466eaf1697737c80ba8c377b097bebf67326 (patch) | |
tree | dd42090803c1f58cfd2bb9ba8d0fc189f8a72f95 | |
parent | 41734b533bd1a0c743f442b1474c1e77fcc63d34 (diff) | |
download | haskell-36d6466eaf1697737c80ba8c377b097bebf67326.tar.gz |
hadrian: Refactor gmp arguments
Move the gmp configuration to its own binding.
-rw-r--r-- | hadrian/src/Settings/Packages.hs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs index e85a95a351..bbd5217cf9 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 |