Set minimum macOS version to 10.14

This commit is contained in:
tobtoht 2023-01-10 02:50:16 +01:00
parent 4e21cb9b35
commit 52b0eea5dc
9 changed files with 16 additions and 158 deletions

View file

@ -1,4 +1,4 @@
OSX_MIN_VERSION=10.15
OSX_MIN_VERSION=10.14
OSX_SDK_VERSION=11.0
XCODE_VERSION=12.2
XCODE_BUILD_ID=12B45b

View file

@ -263,7 +263,6 @@ define $(package)_preprocess_cmds
patch -p1 -i $($(package)_patch_dir)/no_pthread_cond_clockwait.patch && \
patch -p1 -i $($(package)_patch_dir)/windows_func_fix.patch && \
patch -p1 -i $($(package)_patch_dir)/no_wraprt_on_apple.patch && \
patch -p1 -i $($(package)_patch_dir)/___isOSVersionAtLeast_hack.patch && \
mv $($(package)_patch_dir)/WindowsToolchain.cmake . && \
mv $($(package)_patch_dir)/MacToolchain.cmake . && \
mv $($(package)_patch_dir)/aarch64Toolchain.cmake . && \

View file

@ -10,8 +10,8 @@ set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
# TODO: don't hardcode this
set(CMAKE_C_FLAGS "--target=x86_64-apple-darwin -mmacosx-version-min=10.15 -B/feather/contrib/depends/x86_64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include")
set(CMAKE_CXX_FLAGS "--target=x86_64-apple-darwin -mmacosx-version-min=10.15 -B/feather/contrib/depends/x86_64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers -stdlib=libc++ -stdlib++-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1 -isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1 -isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include")
set(CMAKE_C_FLAGS "--target=x86_64-apple-darwin -mmacosx-version-min=10.14 -B/feather/contrib/depends/x86_64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include")
set(CMAKE_CXX_FLAGS "--target=x86_64-apple-darwin -mmacosx-version-min=10.14 -B/feather/contrib/depends/x86_64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers -stdlib=libc++ -stdlib++-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1 -isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1 -isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include")
set(CMAKE_INSTALL_NAME_TOOL x86_64-apple-darwin-install_name_tool)
set(CMAKE_FIND_ROOT_PATH /feather/contrib/depends/x86_64-apple-darwin/)

View file

@ -1,151 +0,0 @@
From 3a7a87074b8c1efd93b587e25a0790708f43dc17 Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Sat, 26 Nov 2022 19:50:04 +0100
Subject: [PATCH] don't use @available
---
src/gui/rhi/qrhimetal.mm | 25 ++-----------------------
1 file changed, 2 insertions(+), 23 deletions(-)
diff --git a/qtbase/src/gui/rhi/qrhimetal.mm b/qtbase/src/gui/rhi/qrhimetal.mm
index bd761b4e15..deb584125c 100644
--- a/qtbase/src/gui/rhi/qrhimetal.mm
+++ b/qtbase/src/gui/rhi/qrhimetal.mm
@@ -2545,119 +2545,102 @@ static inline MTLPixelFormat toMetalTextureFormat(QRhiTexture::Format format, QR
#else
case QRhiTexture::ETC2_RGB8:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatETC2_RGB8_sRGB : MTLPixelFormatETC2_RGB8;
}
qWarning("QRhiMetal: ETC2 compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ETC2_RGB8A1:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatETC2_RGB8A1_sRGB : MTLPixelFormatETC2_RGB8A1;
}
qWarning("QRhiMetal: ETC2 compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ETC2_RGBA8:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatEAC_RGBA8_sRGB : MTLPixelFormatEAC_RGBA8;
}
qWarning("QRhiMetal: ETC2 compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_4x4:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_4x4_sRGB : MTLPixelFormatASTC_4x4_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_5x4:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_5x4_sRGB : MTLPixelFormatASTC_5x4_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_5x5:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_5x5_sRGB : MTLPixelFormatASTC_5x5_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_6x5:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_6x5_sRGB : MTLPixelFormatASTC_6x5_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_6x6:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_6x6_sRGB : MTLPixelFormatASTC_6x6_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_8x5:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_8x5_sRGB : MTLPixelFormatASTC_8x5_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_8x6:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_8x6_sRGB : MTLPixelFormatASTC_8x6_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_8x8:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_8x8_sRGB : MTLPixelFormatASTC_8x8_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_10x5:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_10x5_sRGB : MTLPixelFormatASTC_10x5_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_10x6:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_10x6_sRGB : MTLPixelFormatASTC_10x6_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_10x8:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_10x8_sRGB : MTLPixelFormatASTC_10x8_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_10x10:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_10x10_sRGB : MTLPixelFormatASTC_10x10_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_12x10:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_12x10_sRGB : MTLPixelFormatASTC_12x10_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
return MTLPixelFormatInvalid;
case QRhiTexture::ASTC_12x12:
if (d->caps.isAppleGPU) {
- if (@available(macOS 11.0, *))
return srgb ? MTLPixelFormatASTC_12x12_sRGB : MTLPixelFormatASTC_12x12_LDR;
}
qWarning("QRhiMetal: ASTC compression not supported on this platform");
@@ -2727,12 +2710,8 @@ bool QMetalRenderBuffer::create()
case DepthStencil:
#ifdef Q_OS_MACOS
if (rhiD->caps.isAppleGPU) {
- if (@available(macOS 11.0, *)) {
- desc.storageMode = MTLStorageModeMemoryless;
- d->format = MTLPixelFormatDepth32Float_Stencil8;
- } else {
- Q_UNREACHABLE();
- }
+ desc.storageMode = MTLStorageModeMemoryless;
+ d->format = MTLPixelFormatDepth32Float_Stencil8;
} else {
desc.storageMode = MTLStorageModePrivate;
d->format = rhiD->d->dev.depth24Stencil8PixelFormatSupported
--
2.38.1

View file

@ -112,7 +112,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(BREW OFF)
SET(PORT OFF)
SET(CMAKE_OSX_SYSROOT "@prefix@/../SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/")
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
SET(CMAKE_CXX_STANDARD 14)
SET(LLVM_ENABLE_PIC OFF)
SET(LLVM_ENABLE_PIE OFF)

View file

@ -3,7 +3,7 @@
<plist version="0.9">
<dict>
<key>LSMinimumSystemVersion</key>
<string>10.15.0</string>
<string>10.14.0</string>
<key>LSArchitecturePriority</key>
<array>

View file

@ -24,7 +24,7 @@ and search for [`Xcode 12.2`](https://developer.apple.com/download/all/?q=Xcode%
An Apple ID and cookies enabled for the hostname are needed to download this.
The `sha256sum` of the downloaded XIP archive should be `28d352f8c14a43d9b8a082ac6338dc173cb153f964c6e8fb6ba389e5be528bd0`.
The `sha256sum` of the downloaded XIP archive should be `332477876917786b26dd7c3fc1665d2c5cdca81c72755e6a9754f308de77d33b`.
After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip`
archive. This makes the SDK less-trivial to extract on non-macOS machines. One

View file

@ -60,6 +60,8 @@ def run():
sdk_build_id = pl['ProductBuildVersion']
print("Found MacOSX SDK (version: {sdk_version}, build id: {sdk_build_id})".format(sdk_version=sdk_version, sdk_build_id=sdk_build_id))
clang_rt = xcode_app.joinpath("Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin")
out_name = "Xcode-{xcode_version}-{xcode_build_id}-extracted-SDK-with-libcxx-headers".format(xcode_version=xcode_version, xcode_build_id=xcode_build_id)
xcode_libcxx_dir = xcode_app.joinpath("Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1")
@ -109,6 +111,8 @@ def run():
tarfp_add_with_base_change(tarfp, sdk_dir, out_name)
print("Adding libc++ headers...")
tarfp_add_with_base_change(tarfp, xcode_libcxx_dir, "{}/usr/include/c++/v1".format(out_name))
print("Adding clang_rt libraries")
tarfp_add_with_base_change(tarfp, clang_rt, "{}/lib/darwin".format(out_name))
print("Done! Find the resulting gzipped tarball at:")
print(out_sdktgz_path.resolve())

View file

@ -284,6 +284,12 @@ if(STATIC AND NOT Qt6_FOUND)
endif()
endif()
if(DEPENDS AND APPLE)
# TODO: Needed for ___isOSVersionAtLeast
target_link_libraries(feather
${CMAKE_OSX_SYSROOT}/lib/darwin/libclang_rt.osx.a)
endif()
install(TARGETS feather
DESTINATION ${CMAKE_INSTALL_PREFIX}
)