[release/9.0-staging] Fix inadvertently upgrading compiler warnings to errors by akoeplinger · Pull Request #114331 · dotnet/runtime
I noticed this while looking at an issue in the 9.0 branch with latest clang which runs into a couple warnings fixed in main with dotnet#108888. We intentionally don't set `-Werror` in release branches to avoid breaking the build when newer compilers add warnings via https://github.com/dotnet/runtime/blob/37e4d45236e68946db9d264593aa31a9c00534bc/eng/native/configurecompiler.cmake#L564-L567 However this didn't work because msbuild's WarnAsError was still reading the console output of the native build and upgrading any line with "warning: " to an msbuild error and breaking the build. Suppress this by setting IgnoreStandardErrorWarningFormat="true" on the Exec call. We already did this in the coreclr and mono runtime builds, we just missed it in libs.native.
Copilot AI review requested due to automatic review settings
April 7, 2025 14:24
akoeplinger
changed the title
[release/9.0-staging] Fix inadvertently upgrading compiler warnings to errors (#114323)
[release/9.0-staging] Fix inadvertently upgrading compiler warnings to errors
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