Skip to content

Commit 7f4e270

Browse files
rolfbjarneCopilot
andcommitted
[msbuild] Don't strip dylibs from the .NET runtime
The .NET runtime dylibs (from Microsoft.NETCore.App.Runtime.* NuGet packages) may contain symbols referenced by indirect symbol table entries that can't be stripped. Set NoSymbolStrip=true for these items in _CollectItemsForPostProcessing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent aa741b1 commit 7f4e270

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

msbuild/Xamarin.Shared/Xamarin.Shared.targets

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2962,6 +2962,11 @@ Copyright (C) 2018 Microsoft. All rights reserved.
29622962
<BCSymbolMapName>%(Filename)%(Extension).bcsymbolmap</BCSymbolMapName>
29632963
</_PostProcessingItem>
29642964

2965+
<!-- Don't strip dylibs from the .NET runtime - they may contain symbols that can't be stripped -->
2966+
<_PostProcessingItem Condition="$([MSBuild]::ValueOrDefault('%(_PostProcessingItem.NuGetPackageId)', '').StartsWith('Microsoft.NETCore.App.Runtime'))">
2967+
<NoSymbolStrip>true</NoSymbolStrip>
2968+
</_PostProcessingItem>
2969+
29652970
<!-- Add any items from app extensions -->
29662971
<_PostProcessingAppExtensions Include="@(_AppExtensionPostProcessingItems)" Condition="'%(_AppExtensionPostProcessingItems.IsAppExtension)' == 'true' And '%(_AppExtensionPostProcessingItems.IsXPCService)' != 'true'" />
29672972
<_PostProcessingXpcServices Include="@(_AppExtensionPostProcessingItems)" Condition="'%(_AppExtensionPostProcessingItems.IsAppExtension)' == 'true' And '%(_AppExtensionPostProcessingItems.IsXPCService)' == 'true'" />

0 commit comments

Comments
 (0)