Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions eng/native/build-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,12 @@ build_native()
if [[ "$targetOS" == maccatalyst ]]; then
cmakeArgs="-C $__RepoRootDir/eng/native/tryrun_ios_tvos.cmake $cmakeArgs"

# set default macCatalyst deployment target
# keep in sync with SetOSTargetMinVersions in the root Directory.Build.props
cmakeArgs="-DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_SYSROOT=macosx -DCMAKE_SYSTEM_VARIANT=maccatalyst -DCMAKE_OSX_DEPLOYMENT_TARGET=17.0 $cmakeArgs"
# Intentionally do not set CMAKE_OSX_DEPLOYMENT_TARGET for maccatalyst here:
# - CMake interprets CMAKE_OSX_DEPLOYMENT_TARGET as a macOS minimum version
# instead of MacCatalyst, causing newer clang to reject it as invalid.
# - The effective Catalyst minimum version is enforced via the
# -target *-apple-ios<version>-macabi flag in eng/native/configurecompiler.cmake
cmakeArgs="-DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_SYSROOT=macosx -DCMAKE_SYSTEM_VARIANT=maccatalyst $cmakeArgs"
fi

if [[ "$targetOS" == android || "$targetOS" == linux-bionic ]]; then
Expand Down
2 changes: 2 additions & 0 deletions eng/native/configurecompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,8 @@ if (CLR_CMAKE_HOST_UNIX OR CLR_CMAKE_HOST_WASI)
endif()
endif()
add_link_options(${DISABLE_OVERRIDING_MIN_VERSION_ERROR})
# Keep the Catalyst version in the -target triples below in sync
# with MacCatalystVersionMin in SetOSTargetMinVersions in Directory.Build.props.
if(CLR_CMAKE_HOST_ARCH_ARM64)
set(CLR_CMAKE_MACCATALYST_COMPILER_TARGET "arm64-apple-ios17.0-macabi")
add_link_options(-target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET})
Expand Down
Loading