darwin.CF: Include missing TARGET_OS_* defines
This patch is static and may not be appropriate if the compilation target is iOS.
This commit is contained in:
parent
982f7228ff
commit
2bb0e256ea
2 changed files with 33 additions and 1 deletions
|
@ -0,0 +1,30 @@
|
|||
From 549160574ee44656d50997b27ef83736e0848201 Mon Sep 17 00:00:00 2001
|
||||
From: toonn <toonn@toonn.io>
|
||||
Date: Mon, 26 Apr 2021 20:51:05 +0200
|
||||
Subject: [PATCH] Add missing TARGET_OS_* defines
|
||||
|
||||
---
|
||||
.../Base.subproj/SwiftRuntime/TargetConditionals.h | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/CoreFoundation/Base.subproj/SwiftRuntime/TargetConditionals.h b/CoreFoundation/Base.subproj/SwiftRuntime/TargetConditionals.h
|
||||
index 6d42b873..abf746c9 100644
|
||||
--- a/CoreFoundation/Base.subproj/SwiftRuntime/TargetConditionals.h
|
||||
+++ b/CoreFoundation/Base.subproj/SwiftRuntime/TargetConditionals.h
|
||||
@@ -118,6 +118,13 @@
|
||||
|
||||
#define TARGET_OS_WIN32 TARGET_OS_WINDOWS
|
||||
#define TARGET_OS_MAC TARGET_OS_DARWIN
|
||||
+#define TARGET_OS_OSX TARGET_OS_DARWIN
|
||||
+
|
||||
+#define TARGET_OS_IPHONE 0
|
||||
+#define TARGET_OS_WATCH 0
|
||||
+#define TARGET_OS_TV 0
|
||||
+#define TARGET_OS_EMBEDDED 0
|
||||
+
|
||||
|
||||
#if __x86_64__
|
||||
#define TARGET_CPU_PPC 0
|
||||
--
|
||||
2.17.2 (Apple Git-113)
|
||||
|
|
@ -23,6 +23,8 @@ stdenv.mkDerivation {
|
|||
nativeBuildInputs = [ ninja python3 ];
|
||||
buildInputs = [ curl libxml2 objc4 ICU ];
|
||||
|
||||
patches = [ ./0001-Add-missing-TARGET_OS_-defines.patch ];
|
||||
|
||||
postPatch = ''
|
||||
cd CoreFoundation
|
||||
|
||||
|
@ -76,7 +78,7 @@ stdenv.mkDerivation {
|
|||
# please remove this when updating the default llvm versions to 8 or
|
||||
# later.
|
||||
buildPhase = lib.optionalString true ''
|
||||
for i in {1..512}; do
|
||||
for i in {1..1}; do
|
||||
if ninja -j $NIX_BUILD_CORES; then
|
||||
break
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue