Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion dotnet/targets/Microsoft.Sdk.R2R.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<_ReadyToRunFilesToPublish Remove="@(_ReadyToRunFilesToPublish)" />
<_ReadyToRunFilesToPublish Include="@(_ReadyToRunFilesToPublishFixed)" />
</ItemGroup>
<ItemGroup Condition="'$(PublishReadyToRunComposite)' != 'true'">
<_ReadyToRunCompileListFixed Include="@(_ReadyToRunCompileList)" OutputR2RImage="$(_ReadyToRunOutputPath)/%(Filename)%(Extension)" />
<_ReadyToRunCompileList Remove="@(_ReadyToRunCompileList)" />
<_ReadyToRunCompileList Include="@(_ReadyToRunCompileListFixed)" />
</ItemGroup>
</Target>

<!--
Expand Down Expand Up @@ -78,7 +83,7 @@
</Target>

<!-- Set some default properties -->
<PropertyGroup Condition="'$(PublishReadyToRun)' == 'true' And '$(UseMonoRuntime)' == 'false' And '$(_UseNativeAot)' != 'true'">
<PropertyGroup Condition="'$(PublishReadyToRun)' == 'true' And '$(PublishReadyToRunContainerFormat)' == 'macho' And '$(UseMonoRuntime)' == 'false' And '$(_UseNativeAot)' != 'true'">
<CreateR2RFramework Condition="'$(CreateR2RFramework)' == '' And ('$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS')">true</CreateR2RFramework>
<CreateR2RDylib Condition="'$(CreateR2RDylib)' == '' And '$(CreateR2RFramework)' != 'true'">true</CreateR2RDylib>

Expand Down
1 change: 1 addition & 0 deletions dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@
Platform=$(_PlatformName)
PlatformAssembly=$(_PlatformAssemblyName).dll
PublishReadyToRun=$(PublishReadyToRun)
PublishReadyToRunContainerFormat=$(PublishReadyToRunContainerFormat)
RelativeAppBundlePath=$(_RelativeAppBundlePath)
Registrar=$(Registrar)
@(ReferenceNativeSymbol -> 'ReferenceNativeSymbol=%(SymbolType):%(SymbolMode):%(Identity)')
Expand Down
23 changes: 14 additions & 9 deletions tests/dotnet/UnitTests/AppSizeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public void NativeAOT (ApplePlatform platform, string runtimeIdentifiers)
Run (platform, runtimeIdentifiers, "Release", $"{platform}-NativeAOT", false, dict);
}

[TestCase (ApplePlatform.iOS, "ios-arm64", true)]
[TestCase (ApplePlatform.TVOS, "tvos-arm64", true)]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64", true)]
[TestCase (ApplePlatform.MacOSX, "osx-arm64;osx-x64", false)]
public void CoreCLR_Interpreter (ApplePlatform platform, string runtimeIdentifiers, bool isTrimmed)
{
Expand All @@ -60,16 +63,18 @@ public void CoreCLR_Interpreter (ApplePlatform platform, string runtimeIdentifie
Run (platform, runtimeIdentifiers, "Release", $"{platform}-CoreCLR-Interpreter", isTrimmed, dict);
}
Comment thread
rolfbjarne marked this conversation as resolved.

[TestCase (ApplePlatform.iOS, "ios-arm64")]
public void CoreCLR_Interpreter (ApplePlatform platform, string runtimeIdentifiers)
{
Run (platform, runtimeIdentifiers, "Release", $"{platform}-CoreCLR-Interpreter", true, new Dictionary<string, string> () { { "UseMonoRuntime", "false" }, { "PublishReadyToRun", "false" } });
}

[TestCase (ApplePlatform.iOS, "ios-arm64")]
public void CoreCLR_R2R (ApplePlatform platform, string runtimeIdentifiers)
[TestCase (ApplePlatform.iOS, "ios-arm64", true)]
[TestCase (ApplePlatform.TVOS, "tvos-arm64", true)]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64", true)]
[TestCase (ApplePlatform.MacOSX, "osx-arm64;osx-x64", false)]
public void CoreCLR_R2R (ApplePlatform platform, string runtimeIdentifiers, bool isTrimmed)
{
Run (platform, runtimeIdentifiers, "Release", $"{platform}-CoreCLR-R2R", true, new Dictionary<string, string> () { { "UseMonoRuntime", "false" }, { "PublishReadyToRun", "true" } });
var dict = new Dictionary<string, string> () {
{ "UseMonoRuntime", "false" },
{ "PublishReadyToRun", "true" },
{ "NoDSymUtil", "false" }, // off by default for macOS, but we want to test it, so enable it
};
Run (platform, runtimeIdentifiers, "Release", $"{platform}-CoreCLR-R2R", isTrimmed, dict);
}
Comment thread
rolfbjarne marked this conversation as resolved.

// This test will build the SizeTestApp, and capture the resulting app size.
Expand Down
22,551 changes: 22,551 additions & 0 deletions tests/dotnet/UnitTests/expected/MacCatalyst-CoreCLR-Interpreter-preservedapis.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
AppBundleSize: 10,527,034 bytes (10,280.3 KB = 10.0 MB)
# The following list of files and their sizes is just informational / for review, and isn't used in the test:
Contents/_CodeSignature/CodeResources: 4,951 bytes (4.8 KB = 0.0 MB)
Contents/Info.plist: 1,106 bytes (1.1 KB = 0.0 MB)
Contents/MacOS/SizeTestApp: 242,096 bytes (236.4 KB = 0.2 MB)
Contents/MonoBundle/libcoreclr.dylib: 6,443,104 bytes (6,292.1 KB = 6.1 MB)
Contents/MonoBundle/libSystem.Globalization.Native.dylib: 110,432 bytes (107.8 KB = 0.1 MB)
Contents/MonoBundle/libSystem.IO.Compression.Native.dylib: 1,442,208 bytes (1,408.4 KB = 1.4 MB)
Contents/MonoBundle/libSystem.Native.dylib: 146,688 bytes (143.2 KB = 0.1 MB)
Contents/MonoBundle/libSystem.Net.Security.Native.dylib: 71,120 bytes (69.5 KB = 0.1 MB)
Contents/MonoBundle/libSystem.Security.Cryptography.Native.Apple.dylib: 204,768 bytes (200.0 KB = 0.2 MB)
Contents/MonoBundle/Microsoft.MacCatalyst.dll: 101,888 bytes (99.5 KB = 0.1 MB)
Contents/MonoBundle/runtimeconfig.bin: 1,481 bytes (1.4 KB = 0.0 MB)
Contents/MonoBundle/SizeTestApp.dll: 7,680 bytes (7.5 KB = 0.0 MB)
Contents/MonoBundle/System.Collections.Immutable.dll: 14,848 bytes (14.5 KB = 0.0 MB)
Contents/MonoBundle/System.Diagnostics.StackTrace.dll: 8,192 bytes (8.0 KB = 0.0 MB)
Contents/MonoBundle/System.IO.Compression.dll: 22,528 bytes (22.0 KB = 0.0 MB)
Contents/MonoBundle/System.IO.MemoryMappedFiles.dll: 22,016 bytes (21.5 KB = 0.0 MB)
Contents/MonoBundle/System.Private.CoreLib.dll: 1,584,128 bytes (1,547.0 KB = 1.5 MB)
Contents/MonoBundle/System.Reflection.Metadata.dll: 84,480 bytes (82.5 KB = 0.1 MB)
Contents/MonoBundle/System.Runtime.dll: 5,120 bytes (5.0 KB = 0.0 MB)
Contents/MonoBundle/System.Runtime.InteropServices.dll: 8,192 bytes (8.0 KB = 0.0 MB)
Contents/PkgInfo: 8 bytes (0.0 KB = 0.0 MB)
Loading
Loading