Skip to content

Commit 381ca5e

Browse files
committed
Simplify a bit.
1 parent 4c3cb2e commit 381ca5e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

dotnet/targets/Xamarin.Shared.Sdk.targets

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,8 @@
452452
<!-- TrimMode specifies what the linker will do with framework assemblies -->
453453
<TrimMode Condition="'$(_LinkMode)' == 'TrimMode'">$(TrimMode)</TrimMode>
454454
<TrimMode Condition="'$(_LinkMode)' == 'None'">copy</TrimMode> <!-- Don't use 'copyused', because that might still end up saving some assemblies, and if that's the platform assembly, it may break the partial static registrar -->
455-
<TrimMode Condition="'$(_LinkMode)' == 'SdkOnly' Or '$(_LinkMode)' == 'Full'">link</TrimMode>
456-
<!-- For Full link mode we also need to set TrimMode for all non-framework assemblies. This is done further below -->
455+
<TrimMode Condition="'$(_LinkMode)' == 'SdkOnly'">partial</TrimMode>
456+
<TrimMode Condition="'$(_LinkMode)' == 'Full'">full</TrimMode>
457457

458458
<!-- Determine if any assemblies are actually trimmed, or if we're in a "Don't link" scenario -->
459459
<!-- We're in a "Don't link" scenario if both of the following are true:
@@ -511,10 +511,6 @@
511511
XamarinNativeLibraryDirectory=$(_XamarinNativeLibraryDirectory)
512512
XamarinRuntime=$(_XamarinRuntime)
513513
</_CustomLinkerOptions>
514-
<!-- TrimMode specifies what the linker will do with framework assemblies -->
515-
<TrimMode Condition="'$(_LinkMode)' == 'None'">copy</TrimMode> <!-- Don't use 'copyused', because that might still end up saving some assemblies, and if that's the platform assembly, it may break the partial static registrar -->
516-
<TrimMode Condition="'$(_LinkMode)' == 'SdkOnly'">partial</TrimMode>
517-
<TrimMode Condition="'$(_LinkMode)' == 'Full'">full</TrimMode>
518514
<_ExtraTrimmerArgs>$(_ExtraTrimmerArgs) --custom-data "LinkerOptionsFile=$(_CustomLinkerOptionsFile)"</_ExtraTrimmerArgs>
519515
<_ExtraTrimmerArgs Condition="'$(TrimMode)' == 'copy' And '$(MarkCopiedAssemblies)' != 'true'">$(_ExtraTrimmerArgs) --custom-data DisableMarkingOfCopyAssemblies=true</_ExtraTrimmerArgs>
520516

0 commit comments

Comments
 (0)