Skip to content

Commit a34ee59

Browse files
authored
[Qt6Base] switch to using require_macos_sdk (#12626)
[skip ci]
1 parent 641ab3d commit a34ee59

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

Q/Qt6Base/build_tarballs.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ const host_build = false
1414
sources = [
1515
ArchiveSource("https://download.qt.io/official_releases/qt/$(version.major).$(version.minor)/$version/submodules/qtbase-everywhere-src-$version.tar.xz",
1616
"012043ce6d411e6e8a91fdc4e05e6bedcfa10fcb1347d3c33908f7fdd10dfe05"),
17-
ArchiveSource("https://github.com/roblabla/MacOSX-SDKs/releases/download/macosx14.0/MacOSX14.0.sdk.tar.xz",
18-
"4a31565fd2644d1aec23da3829977f83632a20985561a2038e198681e7e7bf49"),
1917
DirectorySource("./bundled"),
2018
]
2119

@@ -69,28 +67,16 @@ case "$bb_full_target" in
6967
;;
7068
7169
*apple-darwin*)
72-
apple_sdk_root=$WORKSPACE/srcdir/MacOSX14.0.sdk
73-
sed -i "s!/opt/$target/$target/sys-root!$apple_sdk_root!" $CMAKE_TARGET_TOOLCHAIN
74-
sed -i "s!/opt/$target/$target/sys-root!$apple_sdk_root!" /opt/bin/$bb_full_target/$target-clang++
75-
deployarg="-DCMAKE_OSX_DEPLOYMENT_TARGET=12"
7670
export LDFLAGS="-L${libdir}/darwin -lclang_rt.osx"
77-
export MACOSX_DEPLOYMENT_TARGET=12
7871
export OBJCFLAGS="-D__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__=120000"
7972
export OBJCXXFLAGS=$OBJCFLAGS
8073
export CXXFLAGS=$OBJCFLAGS
81-
# Override SDK root of BB tooling, which Qt queries
82-
export SDKROOT=$apple_sdk_root
8374
sed -i 's/exit 1/#exit 1/' /opt/bin/$bb_full_target/$target-clang++
8475
../qtbase-everywhere-src-*/configure -prefix $prefix \
8576
$commonoptions \
8677
-- $commoncmakeoptions \
8778
-DQT_INTERNAL_APPLE_SDK_VERSION=14 \
8879
-DQT_INTERNAL_XCODE_VERSION=15 \
89-
-DCMAKE_SYSROOT=$apple_sdk_root \
90-
-DCMAKE_FRAMEWORK_PATH=$apple_sdk_root/System/Library/Frameworks \
91-
$deployarg \
92-
-DCUPS_INCLUDE_DIR=$apple_sdk_root/usr/include \
93-
-DCUPS_LIBRARIES=$apple_sdk_root/usr/lib/libcups.tbd \
9480
-DQT_FEATURE_vulkan=OFF
9581
sed -i 's/#exit 1/exit 1/' /opt/bin/$bb_full_target/$target-clang++
9682
;;

Q/Qt6Base/common.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ using BinaryBuilder, Pkg
22

33
const YGGDRASIL_DIR = "../.."
44
include(joinpath(YGGDRASIL_DIR, "fancy_toys.jl"))
5+
include(joinpath(YGGDRASIL_DIR, "platforms", "macos_sdks.jl"))
56

67
if !@isdefined host_build
78
host_build = false
@@ -16,7 +17,7 @@ platforms_win = filter(Sys.iswindows, platforms)
1617
platforms = setdiff(platforms, platforms_macos, platforms_win)
1718

1819
# We must use the same version of LLVM for the build toolchain and LLVMCompilerRT_jll
19-
qt_llvm_version = v"16.0.6"
20+
qt_llvm_version = "16.0.6"
2021

2122
make_mac_product(p::Product) = p
2223
function make_mac_product(lp::LibraryProduct)
@@ -30,10 +31,11 @@ end
3031

3132
function build_qt(name, version, sources, script, products, dependencies; products_win=products, ARGS=ARGS)
3233
products_macos = make_mac_product.(products)
33-
preferred_llvm_version = qt_llvm_version
34+
preferred_llvm_version = VersionNumber(qt_llvm_version)
3435
julia_compat="1.6"
3536
if any(should_build_platform.(triplet.(platforms_macos)))
36-
build_tarballs(ARGS, name, version, sources, script, platforms_macos, products_macos, dependencies; preferred_llvm_version, julia_compat)
37+
sources_macos, script_macos = require_macos_sdk("14.0", sources, script; deployment_target="12")
38+
build_tarballs(ARGS, name, version, sources_macos, script_macos, platforms_macos, products_macos, dependencies; preferred_llvm_version, julia_compat)
3739
end
3840
# GCC 12 and before fail with internal compiler error on mingw
3941
if any(should_build_platform.(triplet.(platforms_win)))

0 commit comments

Comments
 (0)