summaryrefslogtreecommitdiff
path: root/compiler/GHC/Platform.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Platform.hs')
-rw-r--r--compiler/GHC/Platform.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/compiler/GHC/Platform.hs b/compiler/GHC/Platform.hs
index a630e0c1d3..6ea05b30a3 100644
--- a/compiler/GHC/Platform.hs
+++ b/compiler/GHC/Platform.hs
@@ -29,6 +29,7 @@ module GHC.Platform
, platformInIntRange
, platformInWordRange
, platformCConvNeedsExtension
+ , platformHasRTSLinker
, PlatformMisc(..)
, SseVersion (..)
, BmiVersion (..)
@@ -271,6 +272,23 @@ platformCConvNeedsExtension platform = case platformArch platform of
| OSDarwin <- platformOS platform -> True
_ -> False
+-- | Does this platform have an RTS linker?
+platformHasRTSLinker :: Platform -> Bool
+-- Note that we've inlined this logic in hadrian's
+-- Settings.Builders.RunTest.inTreeCompilerArgs.
+-- If you change this, be sure to change it too
+platformHasRTSLinker p = case archOS_arch (platformArchOS p) of
+ ArchPPC -> False -- powerpc
+ ArchPPC_64 ELF_V1 -> False -- powerpc64
+ ArchPPC_64 ELF_V2 -> False -- powerpc64le
+ ArchS390X -> False
+ ArchRISCV64 -> False
+ ArchLoongArch64 -> False
+ ArchJavaScript -> False
+ ArchWasm32 -> False
+ _ -> True
+
+
--------------------------------------------------
-- Instruction sets