Skip to content

Conversation

akoeplinger
Copy link
Member

Backport of #119260 to release/9.0-staging

Customer Impact

  • Customer reported
  • Found internally

This just affects the runtime build when using newer Xcode and caused some configure time checks in CMake to fail because of hitting an unknown compiler option, which breaks the build.

Regression

  • Yes
  • No

Testing

Building locally and on CI.

Risk

Low. This just adds additional checks to use the new name for the compiler option.

… clang in Xcode 16.3+ (dotnet#119260)

llvm/llvm-project@1c66d08 renamed the option `-Wno-overriding-t-option` to `-Wno-overriding-option`.
This caused some configure time checks in CMake to fail because of hitting an unknown compiler option.

(cherry picked from commit 4b8a478)
@Copilot Copilot AI review requested due to automatic review settings September 3, 2025 09:31
@akoeplinger
Copy link
Member Author

Infrastructure/build-only change necessary to build the runtime on newer macOS/Xcode versions, tell-mode, applying servicing-approved.

@akoeplinger akoeplinger added the Servicing-approved Approved for servicing release label Sep 3, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes Mac Catalyst builds with newer Xcode versions (16.3+) by updating compiler flag compatibility checks. The issue occurs because clang renamed the -Wno-overriding-t-option flag to -Wno-overriding-option, causing CMake configure checks to fail with unknown compiler options.

Key changes:

  • Removes hardcoded compiler flag that may not be supported in newer clang versions
  • Adds runtime detection logic to test for both old and new compiler flag names
  • Implements fallback mechanism with proper error handling for unsupported compilers

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/mono/mono.proj Removes hardcoded -Wno-overriding-t-option flag that breaks with newer clang
src/mono/CMakeLists.txt Adds Mac Catalyst compiler flag detection with fallback support
eng/native/configurecompiler.cmake Implements dynamic compiler flag detection and fixes typo in comment
Comments suppressed due to low confidence (1)

eng/native/configurecompiler.cmake:669

  • Fixed typo in comment: changed '-tagret' to '-target'.
    # We need to disable the warning that -target replaces -mmacosx-version-min

@akoeplinger
Copy link
Member Author

/ba-g wasm failure is not related to the changes which only apply to MacCatalyst

@akoeplinger akoeplinger merged commit 89f3ed1 into dotnet:release/9.0-staging Sep 4, 2025
154 of 157 checks passed
@akoeplinger akoeplinger deleted the 9.0-fix-maccatalyst branch September 4, 2025 10:59
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants