-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Bulk-suppress linker warnings during library builds #40106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -216,6 +216,18 @@ | |
| <ILLinkArgs>$(ILLinkArgs) --disable-opt unusedinterfaces</ILLinkArgs> | ||
| <!-- keep DynamicDependencyAttribute unless a project explicitly disables it --> | ||
| <ILLinkArgs Condition="'$(ILLinkKeepDepAttributes)' != 'false'">$(ILLinkArgs) --keep-dep-attributes true</ILLinkArgs> | ||
| <!-- suppress warnings with the following codes: | ||
| IL2006: The generic parameter 'T' from A with dynamically accessed member kinds B is passed into the generic parameter | ||
| 'T' from 'System.Lazy<T>' which requires dynamically accessed member kinds 'PublicParameterlessConstructor' | ||
| IL2008: Could not find type A specified in resource B | ||
| IL2009: Could not find method A in type B specified in resource C | ||
| IL2012: Could not find field A in type B specified in resource C | ||
| IL2025: Duplicate preserve of A in B | ||
| IL2026: Calling A which has B can break functionality when trimming application code. The target method might be removed. | ||
| IL2035: Unresolved assembly A in DynamicDependencyAttribute on B | ||
| IL2041: The DynamicallyAccessedMembersAttribute is only allowed on method parameters, return value or generic parameters. | ||
|
Comment on lines
+219
to
+228
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we suppressing all these warnings without any explanation or tracking item? It seems to me that issues like IL2025 should be trivial to fix
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The plan is to do this to be able to enable warnings in the linker. Once we have the XML based suppressions ready the plan is to remove this and replace it with the generated XML files. |
||
| --> | ||
| <ILLinkArgs>$(ILLinkArgs) --nowarn IL2006;IL2008;IL2009;IL2012;IL2025;IL2026;IL2035;IL2041</ILLinkArgs> | ||
| </PropertyGroup> | ||
|
|
||
| <MakeDir Directories="$(ILLinkTrimInputPath)" /> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.