From 70b65bfe40db09617c1490d9453858f018006a9e Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 31 Oct 2019 13:54:58 -0400 Subject: hadrian: Make runtest invocation consistency with Make Use True/False instead of 0/1. This shouldn't be a functional change but we should be consistent. --- hadrian/src/Settings/Builders/RunTest.hs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs index 4b4d815a2c..6e07d1407a 100644 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ b/hadrian/src/Settings/Builders/RunTest.hs @@ -94,7 +94,8 @@ runTestBuilderArgs = builder RunTest ? do -- See #16087 let ghcBuiltByLlvm = False -- TODO: Implement this check - let asZeroOne s b = s ++ zeroOne b + let asBool :: String -> Bool -> String + asBool s b = s ++ show b -- TODO: set CABAL_MINIMAL_BUILD/CABAL_PLUGIN_BUILD mconcat [ arg $ "testsuite/driver/runtests.py" @@ -109,18 +110,18 @@ runTestBuilderArgs = builder RunTest ? do , arg "-e", arg $ "config.exeext=" ++ quote exe , arg "-e", arg $ "config.compiler_debugged=" ++ show debugged - , arg "-e", arg $ asZeroOne "ghc_with_native_codegen=" withNativeCodeGen + , 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 $ asZeroOne "ghc_with_dynamic_rts=" (hasRtsWay "dyn") - , arg "-e", arg $ asZeroOne "ghc_with_threaded_rts=" (hasRtsWay "thr") - , arg "-e", arg $ asZeroOne "config.have_vanilla=" (hasLibWay vanilla) - , arg "-e", arg $ asZeroOne "config.have_dynamic=" (hasLibWay dynamic) - , arg "-e", arg $ asZeroOne "config.have_profiling=" (hasLibWay profiling) - , arg "-e", arg $ asZeroOne "ghc_with_smp=" withSMP + , 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.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 "ghc_with_smp=" withSMP , arg "-e", arg $ "ghc_with_llvm=0" -- TODO: support LLVM , arg "-e", arg $ "config.ghc_dynamic_by_default=" ++ show hasDynamicByDefault -- cgit v1.2.1