summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hadrian/src/Settings/Builders/RunTest.hs14
-rw-r--r--testsuite/mk/test.mk22
2 files changed, 17 insertions, 19 deletions
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs
index 3f0629f4b8..32e7390e87 100644
--- a/hadrian/src/Settings/Builders/RunTest.hs
+++ b/hadrian/src/Settings/Builders/RunTest.hs
@@ -103,6 +103,7 @@ runTestBuilderArgs = builder RunTest ? do
-- TODO: set CABAL_MINIMAL_BUILD/CABAL_PLUGIN_BUILD
mconcat [ arg $ "testsuite/driver/runtests.py"
, pure [ "--rootdir=" ++ testdir | testdir <- rootdirs ]
+ , arg "--extra-hc-flag", arg ghcFlags
, arg "-e", arg $ "windows=" ++ show windowsHost
, arg "-e", arg $ "darwin=" ++ show osxHost
, arg "-e", arg $ "config.local=False"
@@ -111,23 +112,20 @@ runTestBuilderArgs = builder RunTest ? do
, arg "-e", arg $ "config.accept_platform=" ++ show acceptPlatform
, arg "-e", arg $ "config.accept_os=" ++ show acceptOS
, arg "-e", arg $ "config.exeext=" ++ quote (if null exe then "" else "."<>exe)
- , arg "-e", arg $ "config.compiler_debugged=" ++
- show debugged
+ , arg "-e", arg $ "config.compiler_debugged=" ++ show debugged
, arg "-e", arg $ asBool "ghc_with_native_codegen=" withNativeCodeGen
, arg "-e", arg $ "config.have_interp=" ++ show withInterpreter
, arg "-e", arg $ "config.unregisterised=" ++ show unregisterised
- , arg "-e", arg $ "ghc_compiler_always_flags=" ++ quote ghcFlags
- , arg "-e", arg $ asBool "ghc_with_dynamic_rts=" (hasRtsWay "dyn")
- , arg "-e", arg $ asBool "ghc_with_threaded_rts=" (hasRtsWay "thr")
+ , arg "-e", arg $ asBool "config.ghc_with_dynamic_rts=" (hasRtsWay "dyn")
+ , arg "-e", arg $ asBool "config.ghc_with_threaded_rts=" (hasRtsWay "thr")
, arg "-e", arg $ asBool "config.have_vanilla=" (hasLibWay vanilla)
, arg "-e", arg $ asBool "config.have_dynamic=" (hasLibWay dynamic)
, arg "-e", arg $ asBool "config.have_profiling=" (hasLibWay profiling)
, arg "-e", arg $ asBool "config.have_fast_bignum=" (bignumBackend /= "native" && not bignumCheck)
- , arg "-e", arg $ asBool "ghc_with_smp=" withSMP
- , arg "-e", arg $ asBool "ghc_with_llvm=" withLlvm
-
+ , arg "-e", arg $ asBool "config.ghc_with_smp=" withSMP
+ , arg "-e", arg $ asBool "config.ghc_with_llvm=" withLlvm
, arg "-e", arg $ "config.ghc_dynamic_by_default=" ++ show hasDynamicByDefault
, arg "-e", arg $ "config.ghc_dynamic=" ++ show hasDynamic
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index ea4fa55a67..1bec27ec95 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -79,7 +79,7 @@ else
dllext = .so
endif
-RUNTEST_OPTS += -e "ghc_compiler_always_flags='$(TEST_HC_OPTS)'"
+RUNTEST_OPTS += --extra-hc-flag "$(TEST_HC_OPTS)"
ifeq "$(GhcDebugged)" "YES"
RUNTEST_OPTS += -e "config.compiler_debugged=True"
@@ -123,15 +123,15 @@ RUNTEST_OPTS += -e config.have_profiling=False
endif
ifeq "$(filter thr, $(GhcRTSWays))" "thr"
-RUNTEST_OPTS += -e ghc_with_threaded_rts=True
+RUNTEST_OPTS += -e config.ghc_with_threaded_rts=True
else
-RUNTEST_OPTS += -e ghc_with_threaded_rts=False
+RUNTEST_OPTS += -e config.ghc_with_threaded_rts=False
endif
ifeq "$(filter dyn, $(GhcRTSWays))" "dyn"
-RUNTEST_OPTS += -e ghc_with_dynamic_rts=True
+RUNTEST_OPTS += -e config.ghc_with_dynamic_rts=True
else
-RUNTEST_OPTS += -e ghc_with_dynamic_rts=False
+RUNTEST_OPTS += -e config.ghc_with_dynamic_rts=False
endif
ifeq "$(GhcWithInterpreter)" "NO"
@@ -183,21 +183,21 @@ CABAL_PLUGIN_BUILD = --enable-library-vanilla --disable-shared
endif
ifeq "$(GhcWithSMP)" "YES"
-RUNTEST_OPTS += -e ghc_with_smp=True
+RUNTEST_OPTS += -e config.ghc_with_smp=True
else
-RUNTEST_OPTS += -e ghc_with_smp=False
+RUNTEST_OPTS += -e config.ghc_with_smp=False
endif
# Does the LLVM backend work?
ifeq "$(LLC)" ""
-RUNTEST_OPTS += -e ghc_with_llvm=False
+RUNTEST_OPTS += -e config.ghc_with_llvm=False
else ifeq "$(TargetARCH_CPP)" "powerpc"
-RUNTEST_OPTS += -e ghc_with_llvm=False
+RUNTEST_OPTS += -e config.ghc_with_llvm=False
else ifneq "$(LLC)" "llc"
# If we have a real detected value for LLVM, then it really ought to work
-RUNTEST_OPTS += -e ghc_with_llvm=True
+RUNTEST_OPTS += -e config.ghc_with_llvm=True
else
-RUNTEST_OPTS += -e ghc_with_llvm=False
+RUNTEST_OPTS += -e config.ghc_with_llvm=False
endif
ifeq "$(WINDOWS)" "YES"