Skip to content

[preview5] Remove linker warnings for native host and COM #17699

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

Merged
merged 3 commits into from
May 19, 2021

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented May 18, 2021

This includes @LakshanF 's changes from #17657, except for the renamed properties, so that the feature switches get set using the existing names. This gets rid of the following warnings which were not caught by the test infra:

ILLink : Trim analysis warning IL2026: Internal.Runtime.InteropServices.ComponentActivator.GetFunctionPointer(IntPtr,IntPtr,IntPtr,IntPtr,IntPtr,IntPtr
ILLink : Trim analysis warning IL2026: Internal.Runtime.InteropServices.InMemoryAssemblyLoader.LoadInMemoryAssembly(IntPtr,IntPtr

The warning checks in the tests have been made more strict. The issue was that the collapsed warnings weren't caught by the "ILLink :" check (they look like this):

System.Private.CoreLib.dll : warning IL2104: Assembly 'System.Private.CoreLib' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries

To fix this I'm checking for "warning IL" instead, and also not collapsing the warnings for the baseline test cases to produce detailed warnings if the test fails.

LakshanF and others added 3 commits May 18, 2021 15:41
- Validation should look for all ILLink warnings (not all of them have
the "ILLink :" text)
- Don't collapse warnings in these tests to get more useful test output
  when they fail
- Don't look for specific warning codes when there should be none
@ghost
Copy link

ghost commented May 18, 2021

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@sbomer sbomer changed the title Remove COM warnings [preview5] Remove linker warnings for native host and COM May 18, 2021
@sbomer sbomer requested review from eerhardt, LakshanF and tlakollo May 19, 2021 14:09
Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this @sbomer!

@sbomer sbomer merged commit 52298fb into dotnet:release/6.0.1xx-preview5 May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants