summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-07-27 17:42:41 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-08-02 05:20:01 -0400
commit2df92ee17b1b34a6c1e8f956c06494df4ede184e (patch)
tree748b5c6b8037ba11df9ed9559886f5fa9834e266 /hadrian
parentfc23b5ed0f7924308040bf4163fc0a6da176feed (diff)
downloadhaskell-2df92ee17b1b34a6c1e8f956c06494df4ede184e.tar.gz
testsuite: Correctly set withNativeCodeGen
Fixes #21918
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/src/Settings/Builders/RunTest.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs
index f6b40d4065..9118efe511 100644
--- a/hadrian/src/Settings/Builders/RunTest.hs
+++ b/hadrian/src/Settings/Builders/RunTest.hs
@@ -97,7 +97,6 @@ inTreeCompilerArgs stg = do
leadingUnderscore <- flag LeadingUnderscore
-- MP: This setting seems to only dictate whether we turn on optasm as a compiler
-- way, but a lot of tests which use only_ways(optasm) seem to not test the NCG?
- withNativeCodeGen <- return True
withInterpreter <- ghcWithInterpreter
unregisterised <- flag GhcUnregisterised
withSMP <- targetSupportsSMP
@@ -106,6 +105,11 @@ inTreeCompilerArgs stg = do
os <- setting HostOs
arch <- setting TargetArch
+ let codegen_arches = ["x86_64", "i386", "powerpc", "powerpc64", "powerpc64le", "aarch64"]
+ let withNativeCodeGen
+ | unregisterised = False
+ | arch `elem` codegen_arches = True
+ | otherwise = False
platform <- setting TargetPlatform
wordsize <- (show @Int . (*8) . read) <$> setting TargetWordSize