summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-09-17 19:40:48 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-23 16:00:18 -0400
commit552b32f118e1d3a9b6250c979964c7f42f3f80aa (patch)
tree818a4ddc592eb31dd3cd380b9944be31a237e187 /hadrian
parent316ac68fb88e2d61e2dc07c2a75bcfb6d43e0d43 (diff)
downloadhaskell-552b32f118e1d3a9b6250c979964c7f42f3f80aa.tar.gz
testsuite: Pass CFLAGS to hsc2hs tests
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/src/Oracles/TestSettings.hs2
-rw-r--r--hadrian/src/Rules/Test.hs4
2 files changed, 6 insertions, 0 deletions
diff --git a/hadrian/src/Oracles/TestSettings.hs b/hadrian/src/Oracles/TestSettings.hs
index b5f197299b..6b08a43cd5 100644
--- a/hadrian/src/Oracles/TestSettings.hs
+++ b/hadrian/src/Oracles/TestSettings.hs
@@ -34,6 +34,7 @@ data TestSetting = TestHostOS
| TestCLANG
| TestLLC
| TestTEST_CC
+ | TestTEST_CC_OPTS
| TestGhcPackageDbFlag
| TestMinGhcVersion711
| TestMinGhcVersion801
@@ -62,6 +63,7 @@ testSetting key = do
TestCLANG -> "CLANG"
TestLLC -> "LLC"
TestTEST_CC -> "TEST_CC"
+ TestTEST_CC_OPTS -> "TEST_CC_OPTS"
TestGhcPackageDbFlag -> "GhcPackageDbFlag"
TestMinGhcVersion711 -> "MinGhcVersion711"
TestMinGhcVersion801 -> "MinGhcVersion801"
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs
index eeddfd9c3b..c14d68e971 100644
--- a/hadrian/src/Rules/Test.hs
+++ b/hadrian/src/Rules/Test.hs
@@ -137,6 +137,8 @@ testRules = do
[ "--interactive", "-v0", "-ignore-dot-ghci"
, "-fno-ghci-history"
]
+ ccPath <- settingsFileSetting SettingsFileSetting_CCompilerCommand
+ ccFlags <- settingsFileSetting SettingsFileSetting_CCompilerFlags
pythonPath <- builderPath Python
need [ root -/- checkPprProgPath
@@ -157,6 +159,8 @@ testRules = do
setEnv "TEST_HC" ghcPath
setEnv "TEST_HC_OPTS" ghcFlags
setEnv "TEST_HC_OPTS_INTERACTIVE" ghciFlags
+ setEnv "TEST_CC" ccPath
+ setEnv "TEST_CC_OPTS" ccFlags
setEnv "CHECK_PPR" (top -/- root -/- checkPprProgPath)
setEnv "CHECK_EXACT" (top -/- root -/- checkExactProgPath)
setEnv "COUNT_DEPS" (top -/- root -/- countDepsProgPath)