Skip to content

Commit

Permalink
[illink] set $(TrimmerRemoveSymbols) by default
Browse files Browse the repository at this point in the history
Fixes: dotnet#7302
Context: dotnet/linker#2203
Context: dotnet/runtime#67660
Context: dotnet#6598

This partially backports 745214d.

In addition to this backport to dotnet/runtime/release/6.0:

dotnet/runtime#75311

We also have another change in .NET 7 that opts into
`$(TrimmerRemoveSymbols)` by default for `Release` builds. This allows
the .NET 7 linker to have stable MVIDs for assemblies for each
architecture.

There may potentially be a dotnet/linker issue here to look into
further. However, this seems to be the best fix for getting .NET 6
projects building under .NET 7 at the moment.
  • Loading branch information
jonathanpeppers committed Sep 9, 2022
1 parent 04623cd commit f5cdcbc
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This file contains the .NET 5-specific targets to customize ILLink
AfterTargets="ComputeResolvedFilesToPublishList"
DependsOnTargets="GetReferenceAssemblyPaths;_CreatePropertiesCache">
<PropertyGroup>
<TrimmerRemoveSymbols Condition=" '$(AndroidIncludeDebugSymbols)' != 'true' ">true</TrimmerRemoveSymbols>
<!--
Used for the <ILLink DumpDependencies="$(_TrimmerDumpDependencies)" /> value:
https://github.com/dotnet/sdk/blob/a5393731b5b7b225692fff121f747fbbc9e8b140/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets#L150
Expand Down

0 comments on commit f5cdcbc

Please sign in to comment.