Skip to content

Commit

Permalink
Simplify a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Jul 12, 2022
1 parent 4c3cb2e commit 381ca5e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@
<!-- TrimMode specifies what the linker will do with framework assemblies -->
<TrimMode Condition="'$(_LinkMode)' == 'TrimMode'">$(TrimMode)</TrimMode>
<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 -->
<TrimMode Condition="'$(_LinkMode)' == 'SdkOnly' Or '$(_LinkMode)' == 'Full'">link</TrimMode>
<!-- For Full link mode we also need to set TrimMode for all non-framework assemblies. This is done further below -->
<TrimMode Condition="'$(_LinkMode)' == 'SdkOnly'">partial</TrimMode>
<TrimMode Condition="'$(_LinkMode)' == 'Full'">full</TrimMode>

<!-- Determine if any assemblies are actually trimmed, or if we're in a "Don't link" scenario -->
<!-- We're in a "Don't link" scenario if both of the following are true:
Expand Down Expand Up @@ -511,10 +511,6 @@
XamarinNativeLibraryDirectory=$(_XamarinNativeLibraryDirectory)
XamarinRuntime=$(_XamarinRuntime)
</_CustomLinkerOptions>
<!-- TrimMode specifies what the linker will do with framework assemblies -->
<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 -->
<TrimMode Condition="'$(_LinkMode)' == 'SdkOnly'">partial</TrimMode>
<TrimMode Condition="'$(_LinkMode)' == 'Full'">full</TrimMode>
<_ExtraTrimmerArgs>$(_ExtraTrimmerArgs) --custom-data "LinkerOptionsFile=$(_CustomLinkerOptionsFile)"</_ExtraTrimmerArgs>
<_ExtraTrimmerArgs Condition="'$(TrimMode)' == 'copy' And '$(MarkCopiedAssemblies)' != 'true'">$(_ExtraTrimmerArgs) --custom-data DisableMarkingOfCopyAssemblies=true</_ExtraTrimmerArgs>

Expand Down

0 comments on commit 381ca5e

Please sign in to comment.