Skip to content

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

Merged
sbomer merged 3 commits into
dotnet:release/6.0.1xx-preview5from
sbomer:removeCOMWarnings
May 19, 2021
Merged

[preview5] Remove linker warnings for native host and COM#17699
sbomer merged 3 commits into
dotnet:release/6.0.1xx-preview5from
sbomer:removeCOMWarnings

Conversation

@sbomer

@sbomer sbomer commented May 18, 2021

Copy link
Copy Markdown
Member

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

ghost commented May 18, 2021

Copy link
Copy Markdown

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 LakshanF, eerhardt and tlakollo May 19, 2021 14:09

@eerhardt eerhardt left a comment

Copy link
Copy Markdown
Member

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