[illink] set $(TrimmerRemoveSymbols)
by default
#7365
Merged
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.
Fixes: #7302
Context: dotnet/linker#2203
Context: dotnet/runtime#67660
Context: #6598
This partially backports 745214d.
Building a
net6.0-android
app inRelease
mode with .NET 7 can fail with many errors like:This happens because we end up with multiple assemblies, such as:
To fix this, in addition to this backport to dotnet/runtime/release/6.0:
dotnet/runtime#75311
In .NET 7 we opt into
$(TrimmerRemoveSymbols)
by default forRelease
builds. This allows the .NET 7 linker to have stable MVIDs for assemblies for each architecture. Somehow when the linker outputs.pdb
files, it creates different MVIDs per 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.