Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

<TrimmerRootAssembly Include="myEntrypointAssembly" /> won't actually root anything besides the entrypoint with IL Linker. NativeAOT would do what it's instructed to do and root the whole assembly. This is showing up as a difference because the SDK auto-injects this root into all trimmed projects and the resulting apps are not as small as they could be.

`<TrimmerRootAssembly Include="myEntrypointAssembly" />` won't actually root anything with IL Linker. NativeAOT would do what it's instructed to do. This is showing up as a difference because the SDK auto-injects this root into all trimmed projects.
@MichalStrehovsky MichalStrehovsky merged commit 818b603 into dotnet:main Dec 16, 2021
@MichalStrehovsky MichalStrehovsky deleted the rootCompa branch December 16, 2021 21:06
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this pull request Dec 16, 2021
The SDK contains logic to configure trimming - we were skipping all of that. We couldn't previously include the SDK because it would reflection-root the entrypoint assembly. No longer the case after dotnet#62890.
MichalStrehovsky added a commit that referenced this pull request Dec 18, 2021
* Have NativeAOT test execution project include SDK

The SDK contains logic to configure trimming - we were skipping all of that. We couldn't previously include the SDK because it would reflection-root the entrypoint assembly. No longer the case after #62890.
@ghost ghost locked as resolved and limited conversation to collaborators Jan 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants