Add code for linker to generate xml warning suppressions when builds fail #44264
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.
Makes it a bit easier to suppress linker warnings in PRs such as https://github.com/dotnet/runtime/pull/43965/checks?check_run_id=1355002347. With this change the following steps can be taken:
/p:GenerateLinkerWarningSuppressions=true
,build.cmd -subset libs -configuration Debug -ci -allConfigurations /p:GenerateLinkerWarningSuppressions=true
from this failure log.runtime\artifacts\bin\ILLinkTrimAssembly\net6.0-windows-Release-x64\trimmed-runtimepack
System.Net.Security
would go to a file namedruntime\src\libraries\System.Net.Security\src\ILLink\ILLink.Suppressions.xml
.ILLink.Suppressions.Windows_NT.xml
. See this code for some existing conventions. A new convention might need to be added, depending on the failing scenario. Also see Add granular suppressions for linker warnings #40691 which added several XML suppression files to address Enable linker analysis and add baselines for warnings #38033.TODO: