summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Platform.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs
index f69bb4cdf6..ea1a3e5e93 100644
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -12,6 +12,7 @@ module Platform (
target32Bit,
isARM,
osElfTarget,
+ osMachOTarget,
platformUsesFrameworks,
platformBinariesAreStaticLibs,
)
@@ -129,6 +130,11 @@ osElfTarget OSUnknown = False
-- portability, otherwise we have to answer this question for every
-- new platform we compile on (even unreg).
+-- | This predicate tells us whether the OS support Mach-O shared libraries.
+osMachOTarget :: OS -> Bool
+osMachOTarget OSDarwin = True
+osMachOTarget _ = False
+
osUsesFrameworks :: OS -> Bool
osUsesFrameworks OSDarwin = True
osUsesFrameworks OSiOS = True