Skip to content

Commit

Permalink
Recognize TrimMode=partial in ILCompiler targets (dotnet#71117)
Browse files Browse the repository at this point in the history
This should root all non-trimmable assemblies, same as TrimmerDefaultAction=copy.

We still support consuming ILCompiler through NuGet when targeting .NET 6, so recognize the old thing too. We might want to cut the .NET 6 support close to RC and at that time TrimmerDefaultAction handling can go away.

Related: dotnet/linker#2856.
  • Loading branch information
MichalStrehovsky authored Jul 15, 2022
1 parent 6f13196 commit 8f135a2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ The .NET Foundation licenses this file to you under the MIT license.
<IlcArg Include="@(_IlcConditionallyRootedAssemblies->'--conditionalroot:%(Identity)')" />
<IlcArg Include="@(_IlcTrimmedAssemblies->'--trim:%(Identity)')" />
<IlcArg Include="@(_IlcNoSingleWarnAssemblies->'--nosinglewarnassembly:%(Filename)')" />
<IlcArg Condition="'$(TrimmerDefaultAction)' == 'copyused' or '$(TrimmerDefaultAction)' == 'copy'" Include="--defaultrooting" />
<IlcArg Condition="'$(TrimmerDefaultAction)' == 'copyused' or '$(TrimmerDefaultAction)' == 'copy' or '$(TrimMode)' == 'partial'" Include="--defaultrooting" />
<IlcArg Include="--resilient" />

<IlcArg Condition="$(IlcDisableReflection) == 'true'" Include="--feature:System.Reflection.IsReflectionExecutionAvailable=false" />
Expand Down

0 comments on commit 8f135a2

Please sign in to comment.