[maccatalyst][coreclr] Fix native build failure on Xcode 26.2#124220
Conversation
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Removes an invalid macOS deployment target setting from the Mac Catalyst native CMake configuration to unblock builds on Xcode 26.2, where clang now hard-errors on -mmacosx-version-min=17.0.
Changes:
- Drop
-DCMAKE_OSX_DEPLOYMENT_TARGET=17.0from themaccatalystCMake args so CMake’s compiler test uses a valid macOS min-version. - Keep Mac Catalyst targeting driven by the explicit
*-apple-ios17.0-macabitarget triple applied later byconfigurecompiler.cmake.
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Tagging subscribers to this area: @agocke, @dotnet/runtime-infrastructure |
|
Thanks @davidnguyen-tech. Is this failure encountered in the dotnet/dotnet build? Having CMAKE_OSX_DEPLOYMENT_TARGET explicitly defined avoids unexpected behavior when the OS version changes. Could we set a new default minimum value? |
I haven't tried it in dotnet/dotnet yet - only in dotnet/runtime. Yes, setting a default minimum value makes sense. Thanks for suggestion. |
Use the macOS-equivalent deployment target (14.0) instead of the Catalyst version (17.0) for CMAKE_OSX_DEPLOYMENT_TARGET. CMake interprets this value as a macOS min-version since CMAKE_SYSTEM_NAME is Darwin, and newer clang rejects 17.0 as an invalid macOS version. The effective Catalyst minimum version is enforced separately via the -target triple in eng/native/configurecompiler.cmake.
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
a95c373 to
9f1bf51
Compare
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
we should backport this to release/10.0 (maybe after giving it some time in main to uncover unforeseen issues) |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/ba-g Everything builds on CI - subsequent failures are unrelated. |
Summary
Remove
CMAKE_OSX_DEPLOYMENT_TARGETfrom the maccatalyst cmake args ineng/native/build-commons.sh.Problem
Building for maccatalyst fails on Xcode 26.2 with:
The build sets
CMAKE_SYSTEM_NAME=DarwinwithCMAKE_OSX_SYSROOT=macosx, so CMake interpretsCMAKE_OSX_DEPLOYMENT_TARGET=17.0as a macOS deployment target and emits-mmacosx-version-min=17.0. But17.0is a Mac Catalyst version number, not a macOS version. Older clang accepted this silently; Xcode 26.2's clang rejects it as a hard error during CMake's compiler test, beforeconfigurecompiler.cmakecan apply the correct-target arm64-apple-ios17.0-macabitriple.Fix
Remove
CMAKE_OSX_DEPLOYMENT_TARGETentirely. The value is not consumed — the effective Catalyst minimum version is enforced separately via the-target *-apple-ios<version>-macabitriple ineng/native/configurecompiler.cmake.Validation
Full
clr+clr.runtime+libs+packsbuild for maccatalyst-arm64 succeeds with this change on Xcode 26.2 / CMake 4.2.0.