summaryrefslogtreecommitdiff
path: root/compiler/utils/Platform.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils/Platform.hs')
-rw-r--r--compiler/utils/Platform.hs13
1 files changed, 12 insertions, 1 deletions
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs
index 090ce41f30..9e21326369 100644
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -10,7 +10,8 @@ module Platform (
ArmABI(..),
target32Bit,
- osElfTarget
+ osElfTarget,
+ platformUsesFrameworks,
)
where
@@ -60,6 +61,7 @@ data OS
= OSUnknown
| OSLinux
| OSDarwin
+ | OSiOS
| OSSolaris2
| OSMinGW32
| OSFreeBSD
@@ -107,6 +109,7 @@ osElfTarget OSOpenBSD = True
osElfTarget OSNetBSD = True
osElfTarget OSSolaris2 = True
osElfTarget OSDarwin = False
+osElfTarget OSiOS = False
osElfTarget OSMinGW32 = False
osElfTarget OSKFreeBSD = True
osElfTarget OSHaiku = True
@@ -120,3 +123,11 @@ osElfTarget OSUnknown = False
-- portability, otherwise we have to answer this question for every
-- new platform we compile on (even unreg).
+osUsesFrameworks :: OS -> Bool
+osUsesFrameworks OSDarwin = True
+osUsesFrameworks OSiOS = True
+osUsesFrameworks _ = False
+
+platformUsesFrameworks :: Platform -> Bool
+platformUsesFrameworks = osUsesFrameworks . platformOS
+