darwin.CF: Include missing TARGET_OS_* defines

This patch is static and may not be appropriate if the compilation
target is iOS.

authored by

toonn and committed by
Jonathan Ringer
2bb0e256 982f7228

+33 -1
+30
pkgs/os-specific/darwin/swift-corelibs/0001-Add-missing-TARGET_OS_-defines.patch
··· 1 + From 549160574ee44656d50997b27ef83736e0848201 Mon Sep 17 00:00:00 2001 2 + From: toonn <toonn@toonn.io> 3 + Date: Mon, 26 Apr 2021 20:51:05 +0200 4 + Subject: [PATCH] Add missing TARGET_OS_* defines 5 + 6 + --- 7 + .../Base.subproj/SwiftRuntime/TargetConditionals.h | 7 +++++++ 8 + 1 file changed, 7 insertions(+) 9 + 10 + diff --git a/CoreFoundation/Base.subproj/SwiftRuntime/TargetConditionals.h b/CoreFoundation/Base.subproj/SwiftRuntime/TargetConditionals.h 11 + index 6d42b873..abf746c9 100644 12 + --- a/CoreFoundation/Base.subproj/SwiftRuntime/TargetConditionals.h 13 + +++ b/CoreFoundation/Base.subproj/SwiftRuntime/TargetConditionals.h 14 + @@ -118,6 +118,13 @@ 15 + 16 + #define TARGET_OS_WIN32 TARGET_OS_WINDOWS 17 + #define TARGET_OS_MAC TARGET_OS_DARWIN 18 + +#define TARGET_OS_OSX TARGET_OS_DARWIN 19 + + 20 + +#define TARGET_OS_IPHONE 0 21 + +#define TARGET_OS_WATCH 0 22 + +#define TARGET_OS_TV 0 23 + +#define TARGET_OS_EMBEDDED 0 24 + + 25 + 26 + #if __x86_64__ 27 + #define TARGET_CPU_PPC 0 28 + -- 29 + 2.17.2 (Apple Git-113) 30 +
+3 -1
pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix
··· 23 23 nativeBuildInputs = [ ninja python3 ]; 24 24 buildInputs = [ curl libxml2 objc4 ICU ]; 25 25 26 + patches = [ ./0001-Add-missing-TARGET_OS_-defines.patch ]; 27 + 26 28 postPatch = '' 27 29 cd CoreFoundation 28 30 ··· 76 78 # please remove this when updating the default llvm versions to 8 or 77 79 # later. 78 80 buildPhase = lib.optionalString true '' 79 - for i in {1..512}; do 81 + for i in {1..1}; do 80 82 if ninja -j $NIX_BUILD_CORES; then 81 83 break 82 84 fi