Skip to content

Trim netcoreapp libraries against implementations - #136495

Open
am11 wants to merge 5 commits into
dotnet:mainfrom
am11:illink-impl-references
Open

am11 wants to merge 5 commits into
dotnet:mainfrom
am11:illink-impl-references

Conversation

@am11

@am11 am11 commented Oct 27, 2026

Copy link
Copy Markdown
Member

Generic version of @#136476.

Library main Branch Diff
System.ComponentModel.TypeConverter 308,224 307,712 −512
System.Diagnostics.DiagnosticSource 199,168 198,656 −512
System.Diagnostics.Process 158,720 158,208 −512
System.Formats.Tar 106,496 105,984 −512
System.IO.Compression 188,416 187,392 −1,024
System.IO.FileSystem.DriveInfo 38,912 38,400 −512
System.IO.Pipes 56,320 55,808 −512
System.Net.Http 579,584 579,072 −512
System.Net.NameResolution 93,184 92,672 −512
System.Net.Ping 41,984 40,960 −1,024
System.Net.Quic 154,624 150,528 −4,096
System.Net.Security 370,688 370,176 −512
System.Net.Sockets 211,968 209,920 −2,048
System.Runtime.InteropServices 54,784 53,248 −1,536
System.Runtime.Numerics 208,896 203,264 −5,632
System.Security.Cryptography 1,129,472 1,125,376 −4,096
System.Text.Json 725,504 724,480 −1,024
Total (all DLLs) 34,305,024 34,279,936 −25,088

@am11
am11 requested a review from sbomer as a code owner October 27, 2026 00:06
@github-actions github-actions Bot added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Oct 27, 2026
@dotnet-policy-service dotnet-policy-service Bot added linkable-framework Issues associated with delivering a linker friendly framework community-contribution Indicates that the PR has been added by a community member labels Oct 27, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@am11

am11 commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

@jkotas, @agocke, this generic approach is more profitable compared to #136476, but comes with bit of a noise. It skips over AppContext switches.

@am11
am11 requested a review from jkotas October 28, 2026 23:45
@jkotas

jkotas commented Oct 28, 2026

Copy link
Copy Markdown
Member

@sbomer Could you please take a look?

# Conflicts:
#	src/coreclr/vm/wasm/wasi/callhelpers-pinvoke.cpp

@sbomer sbomer 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.

Do we need to somehow prevent baking in constants from an OOB library that might change across versions?

Comment thread eng/illink.targets Resolved
Comment thread eng/illink.targets Resolved
Comment thread eng/illink.targets Resolved
am11 added 2 commits October 29, 2026 22:33
- Use the reference assembly of packable libraries, which can be replaced by a newer package at run time.
- Trim after CoreCompile with the implementation references as inputs, so changes to them are picked up incrementally.
- Don't disable the optimization when BuildAllConfigurations is set, which -pack sets for shipping builds.
- Allow --ignore-substitutions in the cacheable ILLink task arguments.
- Make not updating reference scopes the default in library mode instead of a new option.
@am11

am11 commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Do we need to somehow prevent baking in constants from an OOB library that might change across versions?

Packable libraries now contribute their reference assembly instead of the implementation.

This branch has not been deployed

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

Labels

area-Tools-ILLink .NET linker development as well as trimming analyzers community-contribution Indicates that the PR has been added by a community member linkable-framework Issues associated with delivering a linker friendly framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants