diff options
author | GHC GitLab CI <ghc-ci@gitlab-haskell.org> | 2021-09-17 08:58:34 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-23 16:00:18 -0400 |
commit | 98a3014777a0ac1a99fd66919115ab770d14e0f4 (patch) | |
tree | fc9e70cb2f42307c9149054733db7e0a2d9c4971 /hadrian | |
parent | d7ee5295307c468049480ca5e997c53bc4552170 (diff) | |
download | haskell-98a3014777a0ac1a99fd66919115ab770d14e0f4.tar.gz |
hadrian: Pass CFLAGS to gmp configure
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/src/Rules/Gmp.hs | 4 |
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 ] |