From 2f9d7a29010afbcfd58aa9adc4075dd77118eec7 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Wed, 15 Apr 2026 13:44:11 -0500 Subject: [PATCH] Deps: Fix build on Xcode 26.4 --- .../macos/build-dependencies-universal.sh | 2 ++ .../scripts/macos/build-dependencies.sh | 2 ++ .../scripts/macos/qt110-xcode264.patch | 25 +++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 .github/workflows/scripts/macos/qt110-xcode264.patch diff --git a/.github/workflows/scripts/macos/build-dependencies-universal.sh b/.github/workflows/scripts/macos/build-dependencies-universal.sh index e5feda56ff..3b0b7a9b35 100755 --- a/.github/workflows/scripts/macos/build-dependencies-universal.sh +++ b/.github/workflows/scripts/macos/build-dependencies-universal.sh @@ -301,6 +301,8 @@ cd "qtbase-everywhere-src-$QT" # Patch Qt to support macOS 11 patch -p1 < "$SCRIPTDIR/qt-macos11compat.patch" +# Backport fix build on Xcode 26.4 (https://codereview.qt-project.org/c/qt/qtbase/+/724619) +patch -p1 < "$SCRIPTDIR/qt110-xcode264.patch" # since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary # (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed. diff --git a/.github/workflows/scripts/macos/build-dependencies.sh b/.github/workflows/scripts/macos/build-dependencies.sh index 3fc0121440..125983f2fd 100755 --- a/.github/workflows/scripts/macos/build-dependencies.sh +++ b/.github/workflows/scripts/macos/build-dependencies.sh @@ -244,6 +244,8 @@ cd "qtbase-everywhere-src-$QT" # Patch Qt to support macOS 11 patch -p1 < "$SCRIPTDIR/qt-macos11compat.patch" +# Backport fix build on Xcode 26.4 (https://codereview.qt-project.org/c/qt/qtbase/+/724619) +patch -p1 < "$SCRIPTDIR/qt110-xcode264.patch" # since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary # (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed. diff --git a/.github/workflows/scripts/macos/qt110-xcode264.patch b/.github/workflows/scripts/macos/qt110-xcode264.patch new file mode 100644 index 0000000000..2b60cdf8bd --- /dev/null +++ b/.github/workflows/scripts/macos/qt110-xcode264.patch @@ -0,0 +1,25 @@ +diff --git a/src/corelib/thread/qyieldcpu.h b/src/corelib/thread/qyieldcpu.h +index ab710ea..954c49a 100644 +--- a/src/corelib/thread/qyieldcpu.h ++++ b/src/corelib/thread/qyieldcpu.h +@@ -33,7 +33,9 @@ + noexcept + #endif + { +-#if __has_builtin(__yield) ++#if __has_builtin(__builtin_arm_yield) ++ __builtin_arm_yield(); ++#elif __has_builtin(__yield) + __yield(); // Generic + #elif defined(_YIELD_PROCESSOR) && defined(Q_CC_MSVC) + _YIELD_PROCESSOR(); // Generic; MSVC's +@@ -47,9 +49,6 @@ + _mm_pause(); + #elif defined(Q_PROCESSOR_X86) + __asm__("pause"); // hopefully asm() works in this compiler +- +-#elif __has_builtin(__builtin_arm_yield) +- __builtin_arm_yield(); + #elif defined(Q_PROCESSOR_ARM) && Q_PROCESSOR_ARM >= 7 && defined(Q_CC_GNU) + __asm__("yield"); // this works everywhere +