Skip to content

Commit 69f903e

Browse files
committed
Adjust how the SDKROOT it set to not need updates each version
1 parent d318021 commit 69f903e

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* <How do the end-user experience this issue? what was the impact?> ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?)
1010
* Valgrind could report a branch on an uninitialized read when opening something that is not an encrypted Realm file as an encrypted Realm file ([PR #7789](https://github.com/realm/realm-core/pull/7789), since v14.10.0).
1111
* Opening an FLX realm asynchronously may not wait to download all data ([#7720](https://github.com/realm/realm-core/issues/7720), since FLX sync was introduced).
12+
* Fix compilation with Xcode 16 ([PR #7802](https://github.com/realm/realm-core/pull/7802))
1213

1314
### Breaking changes
1415
* None.

evergreen/config.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,6 @@ buildvariants:
16741674
expansions:
16751675
cmake_bindir: "/opt/homebrew/bin"
16761676
cmake_toolchain_file: "./tools/cmake/xcode.toolchain.cmake"
1677-
extra_flags: "-DCMAKE_XCODE_ATTRIBUTE_SDKROOT=iphoneos"
16781677
cmake_build_tool_options: "-sdk iphonesimulator -arch arm64"
16791678
cmake_generator: Xcode
16801679
max_jobs: $(sysctl -n hw.logicalcpu)
@@ -1707,12 +1706,11 @@ buildvariants:
17071706
expansions:
17081707
cmake_url: "https://s3.amazonaws.com/static.realm.io/evergreen-assets/cmake-3.26.3-macos-universal.tar.gz"
17091708
cmake_bindir: "./cmake_binaries/CMake.app/Contents/bin"
1710-
cmake_toolchain_file: "./tools/cmake/xcode.toolchain.cmake"
17111709
cmake_generator: Xcode
17121710
max_jobs: $(sysctl -n hw.logicalcpu)
17131711
cmake_build_type: Release
17141712
xcode_developer_dir: /Applications/Xcode13.1.app/Contents/Developer
1715-
extra_flags: -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_ARCHITECTURES=x86_64
1713+
extra_flags: -DREALM_ENABLE_ASSERTIONS=ON
17161714
tasks:
17171715
- name: benchmarks
17181716
- name: compile_test
@@ -1724,12 +1722,11 @@ buildvariants:
17241722
expansions:
17251723
cmake_url: "https://s3.amazonaws.com/static.realm.io/evergreen-assets/cmake-3.26.3-macos-universal.tar.gz"
17261724
cmake_bindir: "./cmake_binaries/CMake.app/Contents/bin"
1727-
cmake_toolchain_file: "./tools/cmake/xcode.toolchain.cmake"
17281725
cmake_generator: Xcode
17291726
max_jobs: $(sysctl -n hw.logicalcpu)
17301727
cmake_build_type: Release
17311728
xcode_developer_dir: /Applications/Xcode13.1.app/Contents/Developer
1732-
extra_flags: -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_ARCHITECTURES=arm64
1729+
extra_flags: -DREALM_ENABLE_ASSERTIONS=ON
17331730
tasks:
17341731
- name: benchmarks
17351732

tools/cmake/xcode.toolchain.cmake

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,11 @@ set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator;-appletvos;-appl
1515
set(CMAKE_XCODE_ATTRIBUTE_SUPPORTS_MACCATALYST "YES")
1616
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2,3,4,7")
1717

18-
# With Xcode 14+ the base SDK *mostly* doesn't matter any more, as it
19-
# officially supports multi-platform builds from a single target.
20-
# However, as of Xcode 15 beta 8 xcodebuild (but not Xcode itself) requires the
21-
# visionOS SDK to build for visionOS. 15.0 final doesn't include the visionOS
22-
# SDK, so the SDKROOT is explicitly set by the invoker when building with the
23-
# beta Xcode rather than here.
24-
# Xcode 13 requires using the correct SDK. We no longer support Xcode 13, but
25-
# still use it on evergreen to build the macOS tests (and nothing else).
18+
# As of Xcode 14 the iphoneos SDK supports building for all platforms to
19+
# support multi-platform builds. However, we still have some Xcode 13 builds (for
20+
# benchmarks) that need to set the SDKROOT to macosx.
2621
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_SDKROOT)
27-
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT_1500 "iphoneos")
28-
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT_1400 "iphoneos")
29-
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT_1300 "macosx")
30-
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT "$(SDKROOT_$(XCODE_VERSION_MAJOR))")
22+
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT "iphoneos")
3123
endif()
3224

3325
set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "12.0")

0 commit comments

Comments
 (0)