Skip to content

Keep the trimming target type around if there's a template type layout for the trimming target#126382

Open
jkoritzinsky wants to merge 2 commits intodotnet:mainfrom
jkoritzinsky:ilc-external-constructed
Open

Keep the trimming target type around if there's a template type layout for the trimming target#126382
jkoritzinsky wants to merge 2 commits intodotnet:mainfrom
jkoritzinsky:ilc-external-constructed

Conversation

@jkoritzinsky
Copy link
Copy Markdown
Member

Contributes to #126177

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts NativeAOT dependency tracking for external type map entries so that trim-target types which can be canonically constructed by the runtime type loader also keep the relevant template type layout reachable.

Changes:

  • Add a conditional dependency from the trim target type to the canonical template type layout when the trim target has a distinct canonical form.
  • Ensures the template layout for the canonical form is present when the trim target type is kept due to an external type map entry.

@MichalStrehovsky
Copy link
Copy Markdown
Member

Could you add a regression test too?

@MichalStrehovsky
Copy link
Copy Markdown
Member

Build break in the test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants