summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-02-27 12:59:02 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-03-02 17:14:38 -0500
commit2a2f51d79f145e015cc089d97cf71c19dd27bee4 (patch)
tree24e6859abf947bc2e08072282a27539f0697b2ad /hadrian
parent7c0c76fb1a11532076a0342655a9c889a2a12768 (diff)
downloadhaskell-2a2f51d79f145e015cc089d97cf71c19dd27bee4.tar.gz
Use configure script to detect that we should use in-tree GMP on Windows
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/src/Rules/Gmp.hs6
-rw-r--r--hadrian/src/Settings/Packages.hs7
2 files changed, 4 insertions, 9 deletions
diff --git a/hadrian/src/Rules/Gmp.hs b/hadrian/src/Rules/Gmp.hs
index 2bf41d99e2..405c251b8b 100644
--- a/hadrian/src/Rules/Gmp.hs
+++ b/hadrian/src/Rules/Gmp.hs
@@ -66,14 +66,14 @@ gmpRules = do
isInTree <- flag GmpInTree
- if windowsHost || isInTree -- TODO: We don't use system GMP on Windows. Fix?
+ if isInTree
then do
- putBuild "| No GMP library/framework detected; in tree GMP will be built"
+ putBuild "| In tree GMP will be built"
let intreeHeader = stageP -/- "gmp/gmp.h"
need [intreeHeader]
copyFile intreeHeader header
else do
- putBuild "| GMP library/framework detected and will be used"
+ putBuild "| System GMP library/framework will be used"
copyFile (gmpBase -/- "ghc-gmp.h") header
-- Build in-tree GMP library for the current stage, prioritised so that it
diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs
index 02f483cc53..d06d4292dd 100644
--- a/hadrian/src/Settings/Packages.hs
+++ b/hadrian/src/Settings/Packages.hs
@@ -176,14 +176,9 @@ gmpPackageArgs = do
librariesGmp <- getSetting GmpLibDir
includesGmp <- getSetting GmpIncludeDir
- -- Windows is always built with inplace GMP until we have dynamic
- -- linking working.
- inTreeFlag <- getFlag GmpInTree
- let inTree = inTreeFlag || windowsHost
-
mconcat
[ builder (Cabal Setup) ? mconcat
- [ inTree ? arg "--configure-option=--with-intree-gmp"
+ [ flag GmpInTree ? arg "--configure-option=--with-intree-gmp"
, flag GmpFrameworkPref ?
arg "--configure-option=--with-gmp-framework-preferred"