Skip to content
26 changes: 26 additions & 0 deletions dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2583,6 +2583,32 @@ global using nfloat = global::System.Runtime.InteropServices.NFloat%3B
</ItemGroup>
</Target>

<!--
Add CoreCLR/R2R framework to post-processing so they get stripped.
-->
<PropertyGroup>
<_CollectItemsForPostProcessingDependsOn>
$(_CollectItemsForPostProcessingDependsOn);
_CollectR2RFrameworksForPostProcessing;
</_CollectItemsForPostProcessingDependsOn>
</PropertyGroup>
<Target Name="_CollectR2RFrameworksForPostProcessing" DependsOnTargets="_ComputeFrameworksToCreate">
<ItemGroup>
<!-- Add CoreCLR runtime -->
<_PostProcessingItem
Include="@(_CreatedFrameworksFromDylibs->'$([System.IO.Path]::GetFileName($(AppBundleDir)))/$(_AppFrameworksRelativePath)%(Filename).framework/%(Filename)')">
<Kind>Framework</Kind>
<DSymName>%(Filename).framework.dSYM</DSymName>
</_PostProcessingItem>
<!-- Add R2R composite -->
<_PostProcessingItem
Include="$([System.IO.Path]::GetFileName('$(AppBundleDir)'))/$(_AppFrameworksRelativePath)$(_R2RFrameworkName).framework/$(_R2RFrameworkName)" Condition="'$(CreateR2RFramework)' == 'true'">
<Kind>Framework</Kind>
<DSymName>$(_R2RFrameworkName).framework.dSYM</DSymName>
</_PostProcessingItem>
</ItemGroup>
</Target>

<!-- Import existing targets -->

<PropertyGroup>
Expand Down
5 changes: 0 additions & 5 deletions msbuild/Xamarin.Shared/Xamarin.Shared.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2963,11 +2963,6 @@ Copyright (C) 2018 Microsoft. All rights reserved.
<BCSymbolMapName>%(Filename)%(Extension).bcsymbolmap</BCSymbolMapName>
</_PostProcessingItem>

<!-- Don't strip dylibs from the .NET runtime - they may contain symbols that can't be stripped (https://github.com/dotnet/runtime/issues/124570) -->
<_PostProcessingItem Condition="$([MSBuild]::ValueOrDefault('%(_PostProcessingItem.NuGetPackageId)', '').StartsWith('Microsoft.NETCore.App.Runtime'))">
<NoSymbolStrip>true</NoSymbolStrip>
</_PostProcessingItem>

<!-- Add any items from app extensions -->
<_PostProcessingAppExtensions Include="@(_AppExtensionPostProcessingItems)" Condition="'%(_AppExtensionPostProcessingItems.IsAppExtension)' == 'true' And '%(_AppExtensionPostProcessingItems.IsXPCService)' != 'true'" />
<_PostProcessingXpcServices Include="@(_AppExtensionPostProcessingItems)" Condition="'%(_AppExtensionPostProcessingItems.IsAppExtension)' == 'true' And '%(_AppExtensionPostProcessingItems.IsXPCService)' == 'true'" />
Expand Down
28 changes: 14 additions & 14 deletions tests/dotnet/UnitTests/expected/iOS-CoreCLR-Interpreter-size.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
AppBundleSize: 10,718,502 bytes (10,467.3 KB = 10.2 MB)
AppBundleSize: 9,240,684 bytes (9,024.1 KB = 8.8 MB)
# The following list of files and their sizes is just informational / for review, and isn't used in the test:
_CodeSignature/CodeResources: 10,847 bytes (10.6 KB = 0.0 MB)
archived-expanded-entitlements.xcent: 384 bytes (0.4 KB = 0.0 MB)
Frameworks/libcoreclr.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libcoreclr.framework/Info.plist: 840 bytes (0.8 KB = 0.0 MB)
Frameworks/libcoreclr.framework/libcoreclr: 6,623,056 bytes (6,467.8 KB = 6.3 MB)
Frameworks/libcoreclr.framework/Info.plist: 818 bytes (0.8 KB = 0.0 MB)
Frameworks/libcoreclr.framework/libcoreclr: 5,204,000 bytes (5,082.0 KB = 5.0 MB)
Frameworks/libSystem.Globalization.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libSystem.Globalization.Native.framework/Info.plist: 882 bytes (0.9 KB = 0.0 MB)
Frameworks/libSystem.Globalization.Native.framework/libSystem.Globalization.Native: 110,064 bytes (107.5 KB = 0.1 MB)
Frameworks/libSystem.Globalization.Native.framework/Info.plist: 860 bytes (0.8 KB = 0.0 MB)
Frameworks/libSystem.Globalization.Native.framework/libSystem.Globalization.Native: 109,248 bytes (106.7 KB = 0.1 MB)
Frameworks/libSystem.IO.Compression.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libSystem.IO.Compression.Native.framework/Info.plist: 884 bytes (0.9 KB = 0.0 MB)
Frameworks/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native: 1,459,024 bytes (1,424.8 KB = 1.4 MB)
Frameworks/libSystem.IO.Compression.Native.framework/Info.plist: 862 bytes (0.8 KB = 0.0 MB)
Frameworks/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native: 1,431,296 bytes (1,397.8 KB = 1.4 MB)
Frameworks/libSystem.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libSystem.Native.framework/Info.plist: 854 bytes (0.8 KB = 0.0 MB)
Frameworks/libSystem.Native.framework/libSystem.Native: 163,312 bytes (159.5 KB = 0.2 MB)
Frameworks/libSystem.Native.framework/Info.plist: 832 bytes (0.8 KB = 0.0 MB)
Frameworks/libSystem.Native.framework/libSystem.Native: 161,920 bytes (158.1 KB = 0.2 MB)
Frameworks/libSystem.Net.Security.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libSystem.Net.Security.Native.framework/Info.plist: 880 bytes (0.9 KB = 0.0 MB)
Frameworks/libSystem.Net.Security.Native.framework/libSystem.Net.Security.Native: 88,048 bytes (86.0 KB = 0.1 MB)
Frameworks/libSystem.Net.Security.Native.framework/Info.plist: 858 bytes (0.8 KB = 0.0 MB)
Frameworks/libSystem.Net.Security.Native.framework/libSystem.Net.Security.Native: 88,016 bytes (86.0 KB = 0.1 MB)
Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/Info.plist: 910 bytes (0.9 KB = 0.0 MB)
Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple: 222,896 bytes (217.7 KB = 0.2 MB)
Info.plist: 1,168 bytes (1.1 KB = 0.0 MB)
Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/Info.plist: 888 bytes (0.9 KB = 0.0 MB)
Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple: 194,256 bytes (189.7 KB = 0.2 MB)
Info.plist: 1,146 bytes (1.1 KB = 0.0 MB)
Microsoft.iOS.dll: 98,816 bytes (96.5 KB = 0.1 MB)
PkgInfo: 8 bytes (0.0 KB = 0.0 MB)
runtimeconfig.bin: 1,481 bytes (1.4 KB = 0.0 MB)
Expand Down
32 changes: 16 additions & 16 deletions tests/dotnet/UnitTests/expected/iOS-CoreCLR-R2R-size.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
AppBundleSize: 15,304,461 bytes (14,945.8 KB = 14.6 MB)
AppBundleSize: 13,826,109 bytes (13,502.1 KB = 13.2 MB)
# The following list of files and their sizes is just informational / for review, and isn't used in the test:
_CodeSignature/CodeResources: 11,701 bytes (11.4 KB = 0.0 MB)
archived-expanded-entitlements.xcent: 384 bytes (0.4 KB = 0.0 MB)
Frameworks/libcoreclr.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libcoreclr.framework/Info.plist: 840 bytes (0.8 KB = 0.0 MB)
Frameworks/libcoreclr.framework/libcoreclr: 6,623,056 bytes (6,467.8 KB = 6.3 MB)
Frameworks/libcoreclr.framework/Info.plist: 818 bytes (0.8 KB = 0.0 MB)
Frameworks/libcoreclr.framework/libcoreclr: 5,204,000 bytes (5,082.0 KB = 5.0 MB)
Frameworks/libSystem.Globalization.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libSystem.Globalization.Native.framework/Info.plist: 882 bytes (0.9 KB = 0.0 MB)
Frameworks/libSystem.Globalization.Native.framework/libSystem.Globalization.Native: 110,064 bytes (107.5 KB = 0.1 MB)
Frameworks/libSystem.Globalization.Native.framework/Info.plist: 860 bytes (0.8 KB = 0.0 MB)
Frameworks/libSystem.Globalization.Native.framework/libSystem.Globalization.Native: 109,248 bytes (106.7 KB = 0.1 MB)
Frameworks/libSystem.IO.Compression.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libSystem.IO.Compression.Native.framework/Info.plist: 884 bytes (0.9 KB = 0.0 MB)
Frameworks/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native: 1,459,024 bytes (1,424.8 KB = 1.4 MB)
Frameworks/libSystem.IO.Compression.Native.framework/Info.plist: 862 bytes (0.8 KB = 0.0 MB)
Frameworks/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native: 1,431,296 bytes (1,397.8 KB = 1.4 MB)
Frameworks/libSystem.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libSystem.Native.framework/Info.plist: 854 bytes (0.8 KB = 0.0 MB)
Frameworks/libSystem.Native.framework/libSystem.Native: 163,312 bytes (159.5 KB = 0.2 MB)
Frameworks/libSystem.Native.framework/Info.plist: 832 bytes (0.8 KB = 0.0 MB)
Frameworks/libSystem.Native.framework/libSystem.Native: 161,920 bytes (158.1 KB = 0.2 MB)
Frameworks/libSystem.Net.Security.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libSystem.Net.Security.Native.framework/Info.plist: 880 bytes (0.9 KB = 0.0 MB)
Frameworks/libSystem.Net.Security.Native.framework/libSystem.Net.Security.Native: 88,048 bytes (86.0 KB = 0.1 MB)
Frameworks/libSystem.Net.Security.Native.framework/Info.plist: 858 bytes (0.8 KB = 0.0 MB)
Frameworks/libSystem.Net.Security.Native.framework/libSystem.Net.Security.Native: 88,016 bytes (86.0 KB = 0.1 MB)
Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/Info.plist: 910 bytes (0.9 KB = 0.0 MB)
Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple: 222,896 bytes (217.7 KB = 0.2 MB)
Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/Info.plist: 888 bytes (0.9 KB = 0.0 MB)
Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple: 194,256 bytes (189.7 KB = 0.2 MB)
Frameworks/SizeTestApp.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB)
Frameworks/SizeTestApp.framework/Info.plist: 843 bytes (0.8 KB = 0.0 MB)
Frameworks/SizeTestApp.framework/Info.plist: 821 bytes (0.8 KB = 0.0 MB)
Frameworks/SizeTestApp.framework/SizeTestApp: 3,913,744 bytes (3,822.0 KB = 3.7 MB)
Info.plist: 1,168 bytes (1.1 KB = 0.0 MB)
Microsoft.iOS.dll: 164,352 bytes (160.5 KB = 0.2 MB)
Info.plist: 1,146 bytes (1.1 KB = 0.0 MB)
Microsoft.iOS.dll: 163,840 bytes (160.0 KB = 0.2 MB)
PkgInfo: 8 bytes (0.0 KB = 0.0 MB)
runtimeconfig.bin: 1,481 bytes (1.4 KB = 0.0 MB)
SizeTestApp: 196,432 bytes (191.8 KB = 0.2 MB)
Expand Down
Loading