Enable additional ways to opt in to trimming#16094
Merged
sbomer merged 2 commits intodotnet:masterfrom Mar 1, 2021
Merged
Conversation
This implements the SDK side of the behavior described at https://github.com/mono/linker/blob/main/docs/design/trimmed-assemblies.md#net-6. This includes a linker update with dotnet/linker#1839.
|
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. |
pranavkm
reviewed
Feb 26, 2021
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets
Outdated
Show resolved
Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets
Outdated
Show resolved
Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets
Outdated
Show resolved
Hide resolved
- use JoinItems task :) - always set _TrimmerDefaultAction
marek-safar
reviewed
Feb 26, 2021
| ReferenceAssemblyPaths="@(ReferencePath)" | ||
| RootAssemblyNames="@(TrimmerRootAssembly)" | ||
| TrimMode="$(TrimMode)" | ||
| DefaultAction="$(_TrimmerDefaultAction)" |
Contributor
There was a problem hiding this comment.
Should _TrimmerDefaultAction use underscore? This is the only property the developers would need to change to make their apps fully linker, right?
Member
Author
There was a problem hiding this comment.
Yes - I would like it to be public - but in the discussions about a similar TrimAllAssemblies opt-in there were concerns about making it too easy to trim everything. I restarted the discussion in #16140.
eerhardt
reviewed
Feb 26, 2021
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets
Show resolved
Hide resolved
marek-safar
approved these changes
Mar 1, 2021
sbomer
added a commit
to dotnet/installer
that referenced
this pull request
Mar 2, 2021
These assemblies now opt into trimming using AssemblyMetadata: dotnet/runtime#48428. The SDK side of the change was made in dotnet/sdk#16094. For more context, see https://github.com/mono/linker/blob/main/docs/design/trimmed-assemblies.md#net-6.
dotnet-maestro bot
added a commit
to dotnet/installer
that referenced
this pull request
Mar 2, 2021
[master] Update dependencies from dotnet/sdk - Coherency Updates: - Microsoft.NET.ILLink.Tasks: from 6.0.100-preview.2.21124.3 to 6.0.100-preview.2.21125.1 (parent: Microsoft.NET.Sdk) - Don't set IsTrimmable on netcoreapp in 6.0 These assemblies now opt into trimming using AssemblyMetadata: dotnet/runtime#48428. The SDK side of the change was made in dotnet/sdk#16094. For more context, see https://github.com/mono/linker/blob/main/docs/design/trimmed-assemblies.md#net-6.
This was referenced Mar 16, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements the SDK side of the behavior described at https://github.com/mono/linker/blob/main/docs/design/trimmed-assemblies.md#net-6.
This includes a linker update with dotnet/linker#1839.
The last step will be to remove https://github.com/dotnet/installer/blob/master/src/redist/targets/GenerateBundledVersions.targets#L253 when this flows to installer.
@pranavkm