summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorGHC GitLab CI <ghc-ci@gitlab-haskell.org>2021-09-17 08:58:34 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-23 16:00:18 -0400
commit98a3014777a0ac1a99fd66919115ab770d14e0f4 (patch)
treefc9e70cb2f42307c9149054733db7e0a2d9c4971 /hadrian
parentd7ee5295307c468049480ca5e997c53bc4552170 (diff)
downloadhaskell-98a3014777a0ac1a99fd66919115ab770d14e0f4.tar.gz
hadrian: Pass CFLAGS to gmp configure
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/src/Rules/Gmp.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/hadrian/src/Rules/Gmp.hs b/hadrian/src/Rules/Gmp.hs
index 6d89a5b0e9..985f13ef29 100644
--- a/hadrian/src/Rules/Gmp.hs
+++ b/hadrian/src/Rules/Gmp.hs
@@ -8,6 +8,8 @@ import Packages
import Target
import Utilities
import Hadrian.BuildPath
+import Hadrian.Expression
+import Settings.Builders.Common (cArgs)
-- | Build in-tree GMP library objects (if GmpInTree flag is set) and return
-- their paths.
@@ -117,8 +119,10 @@ gmpRules = do
let gmpBuildP = takeDirectory mk
gmpP = takeDirectory gmpBuildP
ctx <- makeGmpPathContext gmpP
+ cFlags <- interpretInContext ctx $ mconcat [ cArgs, getStagedSettingList ConfCcArgs ]
env <- sequence
[ builderEnvironment "CC" $ Cc CompileC (stage ctx)
+ , return . AddEnv "CFLAGS" $ unwords cFlags
, builderEnvironment "AR" (Ar Unpack (stage ctx))
, builderEnvironment "NM" Nm
]