macos: fix Apple SDK bug workaround for non-macOS targets

Turns out that MAC != OSX, despite what these names otherwise mean and
what's suggested by source code comments. "MAC" in fact means Darwin
(aka Apple), not macOS. "OSX" means macOS.

GitHub bumped the macos-14 runner default to Xcode 15.4, hitting the
llvm@15 incompatibility bug by default. Meaning the previous workaround
for the SDK bug is necessary.

This patch extend the workaround to not apply to mobile OS variants.

Follow-up to ff784af461 #14159
Reported-by: Sergey
Confirmed-by: Marcel Raad
Fixes #14269
Closes #14275
This commit is contained in:
Viktor Szakats 2024-07-26 00:10:21 +02:00
parent 0f2876b2c3
commit 5f6b9244ce
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -71,7 +71,9 @@
the necessary dynamic detection features, so the SDK falls back to
a codepath that sets both the old and new macro to 1. */
#if defined(TARGET_OS_MAC) && TARGET_OS_MAC && \
defined(TARGET_OS_OSX) && !TARGET_OS_OSX
defined(TARGET_OS_OSX) && !TARGET_OS_OSX && \
(!defined(TARGET_OS_IPHONE) || !TARGET_OS_IPHONE) && \
(!defined(TARGET_OS_SIMULATOR) || !TARGET_OS_SIMULATOR)
#undef TARGET_OS_OSX
#define TARGET_OS_OSX TARGET_OS_MAC
#endif