diff options
author | Layomi Akinrinade <laakinri@microsoft.com> | 2020-07-30 21:42:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-30 21:42:48 +0300 |
commit | a87ee38f833d6d9b9d428b99530791abedbcc160 (patch) | |
tree | 8b206af8475a1fd83528d234ce656414d925af51 /eng/illink.targets | |
parent | fbca8027f0c354b0eaf2f107119b74515941cca9 (diff) |
Bulk-suppress linker warnings during library builds (#40106)
* Enable verbose linker output and bulk-suppress warnings
* Suppress ILLinker warnings for now, so ILLinker can enable warnings by default
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Diffstat (limited to 'eng/illink.targets')
-rw-r--r-- | eng/illink.targets | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/eng/illink.targets b/eng/illink.targets index 79eb5d40964..ddd4936cc26 100644 --- a/eng/illink.targets +++ b/eng/illink.targets @@ -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. + --> + <ILLinkArgs>$(ILLinkArgs) --nowarn IL2006;IL2008;IL2009;IL2012;IL2025;IL2026;IL2035;IL2041</ILLinkArgs> </PropertyGroup> <MakeDir Directories="$(ILLinkTrimInputPath)" /> |