summaryrefslogtreecommitdiff
path: root/hadrian/src/Settings/Packages.hs
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2018-12-05 20:46:21 -0800
committerBen Gamari <ben@well-typed.com>2019-01-23 14:07:28 -0500
commitefc95841503a78504c0aa00925fb22c4ec4627af (patch)
tree88ccd49a18f83f19418131e8cb31b635bb8cfddb /hadrian/src/Settings/Packages.hs
parentdaff24bc74c1fed7efb1acde2d8f90dc9621a308 (diff)
downloadhaskell-efc95841503a78504c0aa00925fb22c4ec4627af.tar.gz
Hadrian: support in-tree GMP
Summary: This adds top-level configure flags '--with-intree-gmp' and '--with-framework-preferred', both of which are especially relevant on MacOS. Besides gaining two new flags, Hadrian also had to be taught what to do with the 'framework' in .cabal files. Test Plan: ./boot && ./configure --with-intree-gmp && ./hadrian/build.sh ./boot && ./configure --with-gmp-framework-preferred && ./hadrian/build.sh # on macos Reviewers: carter, snowleopard, alpmestan, hvr, goldfire, bgamari Subscribers: rwbarton, erikd GHC Trac Issues: #16001 Differential Revision: https://phabricator.haskell.org/D5417
Diffstat (limited to 'hadrian/src/Settings/Packages.hs')
-rw-r--r--hadrian/src/Settings/Packages.hs12
1 files changed, 4 insertions, 8 deletions
diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs
index 5993723bee..4be0fba740 100644
--- a/hadrian/src/Settings/Packages.hs
+++ b/hadrian/src/Settings/Packages.hs
@@ -136,14 +136,10 @@ packageArgs = do
[ builder Cc ? arg includeGmp
, builder (Cabal Setup) ? mconcat
- [ -- TODO: This should respect some settings flag "InTreeGmp".
- -- Depending on @IncludeDir@ and @LibDir@ is bound to fail, since
- -- these are only set if the configure script was explicilty
- -- called with GMP include and lib dirs. Their absense as such
- -- does not imply @in-tree-gmp@.
- -- (null gmpIncludeDir && null gmpLibDir) ?
- -- arg "--configure-option=--with-intree-gmp"
- arg ("--configure-option=CFLAGS=" ++ includeGmp)
+ [ flag GmpInTree ? arg "--configure-option=--with-intree-gmp"
+ , flag GmpFrameworkPref ?
+ arg "--configure-option=--with-gmp-framework-preferred"
+ , arg ("--configure-option=CFLAGS=" ++ includeGmp)
, arg ("--gcc-options=" ++ includeGmp) ] ]
---------------------------------- rts ---------------------------------