File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -91,11 +91,12 @@ build_native()
9191 if [[ " $targetOS " == maccatalyst ]]; then
9292 cmakeArgs=" -C $__RepoRootDir /eng/native/tryrun_ios_tvos.cmake $cmakeArgs "
9393
94- # CMAKE_OSX_DEPLOYMENT_TARGET is set to the macOS equivalent (14.0) of the
95- # Catalyst min version (17.0) so CMake's compiler test emits a valid
96- # -mmacosx-version-min flag. The effective Catalyst min version is enforced
97- # via the -target triple in eng/native/configurecompiler.cmake, not this value.
98- cmakeArgs=" -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_SYSROOT=macosx -DCMAKE_SYSTEM_VARIANT=maccatalyst -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 $cmakeArgs "
94+ # Intentionally do not set CMAKE_OSX_DEPLOYMENT_TARGET for maccatalyst here:
95+ # - CMake interprets CMAKE_OSX_DEPLOYMENT_TARGET as a macOS minimum version
96+ # instead of MacCatalyst, causing newer clang to reject it as invalid.
97+ # - The effective Catalyst minimum version is enforced via the
98+ # -target *-apple-ios<version>-macabi flag in eng/native/configurecompiler.cmake
99+ cmakeArgs=" -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_SYSROOT=macosx -DCMAKE_SYSTEM_VARIANT=maccatalyst $cmakeArgs "
99100 fi
100101
101102 if [[ " $targetOS " == android || " $targetOS " == linux-bionic ]]; then
Original file line number Diff line number Diff line change @@ -727,6 +727,8 @@ if (CLR_CMAKE_HOST_UNIX OR CLR_CMAKE_HOST_WASI)
727727 endif ()
728728 endif ()
729729 add_link_options (${DISABLE_OVERRIDING_MIN_VERSION_ERROR} )
730+ # Keep the Catalyst version in the -target triples below in sync
731+ # with MacCatalystVersionMin in SetOSTargetMinVersions in Directory.Build.props.
730732 if (CLR_CMAKE_HOST_ARCH_ARM64)
731733 set (CLR_CMAKE_MACCATALYST_COMPILER_TARGET "arm64-apple-ios17.0-macabi" )
732734 add_link_options (-target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET} )
You can’t perform that action at this time.
0 commit comments