[release/8.0-staging][maccatalyst] Check for -Wno-overriding-option for compatibility with clang in Xcode 16.3+#119303
Merged
akoeplinger merged 1 commit intodotnet:release/8.0-stagingfrom Sep 4, 2025
Conversation
… 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) (cherry picked from commit f08548f)
Member
Author
|
Infrastructure/build-only change necessary to build the runtime on newer macOS/Xcode versions, tell-mode, applying servicing-approved. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds compatibility for newer versions of clang in Xcode 16.3+ by checking for the renamed compiler option -Wno-overriding-option while maintaining backward compatibility with the older -Wno-overriding-t-option.
Key changes:
- Implements feature detection to check which compiler warning flag is supported
- Adds fallback logic to handle both old and new clang option names
- Removes hardcoded usage of the old option name
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/mono/mono.proj | Removes hardcoded -Wno-overriding-t-option flag that was causing build failures |
| src/mono/CMakeLists.txt | Adds runtime detection for both -Wno-overriding-option and -Wno-overriding-t-option compiler flags |
| eng/native/configurecompiler.cmake | Implements similar compiler flag detection and updates link options to use the detected flag |
ViktorHofer
approved these changes
Sep 4, 2025
7442eca
into
dotnet:release/8.0-staging
183 of 185 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #119260 to release/8.0-staging
Customer Impact
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
Testing
Building locally and on CI.
Risk
Low. This just adds additional checks to use the new name for the compiler option.