Merge remote-tracking branch 'origin/main' into dev/alex/net9-main-merge

This commit is contained in:
Alex Soto 2024-07-31 09:01:02 -04:00
Родитель 30dff95612 76769f17d5
Коммит b4dff0b30a
5 изменённых файлов: 63 добавлений и 29 удалений

Просмотреть файл

@ -1093,12 +1093,12 @@
<_AOTOutputDirectory>$(_IntermediateNativeLibraryDir)aot-output/</_AOTOutputDirectory>
<!--
Enable dedup optimization whenever we run AOT compiler
The only exception is maccatalyst-x64 which uses AOT when the interpreter is also enabled.
Enable dedup optimization when we run AOT compiler and target ARM64 architecture.
Target architecture condition is required since when we target x86_64 we utilize MONO_AOT_MODE_INTERP_ONLY mode (AOT + interpreter).
In such setup, during runtime, AOT images are loaded but marked as unusuable as they are compiled with `full` compiler switch and the code falls back to interpreter.
Dedup AOT image is specially handled by the AOT runtime and it is not allowed to have it marked as unusuable.
-->
<_IsDedupEnabled Condition="'$(_IsDedupEnabled)' == '' And '$(_RunAotCompiler)' == 'true' And '$(IsMacEnabled)' == 'true' And '$(RuntimeIdentifier)' != 'maccatalyst-x64'">true</_IsDedupEnabled>
<_IsDedupEnabled Condition="'$(_IsDedupEnabled)' == '' And '$(_RunAotCompiler)' == 'true' And '$(IsMacEnabled)' == 'true' And '$(TargetArchitectures)' == 'ARM64'">true</_IsDedupEnabled>
<_DedupAssembly Condition="'$(_IsDedupEnabled)' == 'true'">$(IntermediateOutputPath)aot-instances.dll</_DedupAssembly>
<!-- default to 'static' for Mac Catalyst to work around https://github.com/xamarin/xamarin-macios/issues/14686 -->

Просмотреть файл

@ -78,9 +78,9 @@
<Uri>https://github.com/dotnet/templating</Uri>
<Sha />
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.iOS.Shared" Version="9.0.0-prerelease.24354.1">
<Dependency Name="Microsoft.DotNet.XHarness.iOS.Shared" Version="9.0.0-prerelease.24358.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>0302f46c9df3a01533fc7b911a77b3507af64e15</Sha>
<Sha>2c5fdbed5ea74da70649c03084bc01035f35a3fe</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>

Просмотреть файл

@ -12,7 +12,7 @@
<MicrosoftNETRuntimeMonoTargetsSdkPackageVersion>9.0.0-alpha.1.23556.4</MicrosoftNETRuntimeMonoTargetsSdkPackageVersion>
<MicrosoftTemplateEngineTasksVersion>7.0.100-alpha.1.21601.1</MicrosoftTemplateEngineTasksVersion>
<MicrosoftDotNetCecilPackageVersion>0.11.5-alpha.24324.1</MicrosoftDotNetCecilPackageVersion>
<MicrosoftDotNetXHarnessiOSSharedPackageVersion>9.0.0-prerelease.24326.1</MicrosoftDotNetXHarnessiOSSharedPackageVersion>
<MicrosoftDotNetXHarnessiOSSharedPackageVersion>9.0.0-prerelease.24358.1</MicrosoftDotNetXHarnessiOSSharedPackageVersion>
<!-- Manually updated versions -->
<Emscriptennet7WorkloadVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version)</Emscriptennet7WorkloadVersion>
<EmscriptenWorkloadVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version)</EmscriptenWorkloadVersion>

Просмотреть файл

@ -2019,18 +2019,12 @@ namespace Xamarin.Tests {
}
[Test]
[TestCase (ApplePlatform.iOS, "ios-arm64;", "-all,System.Private.CoreLib")]
[TestCase (ApplePlatform.iOS, "ios-arm64;", "all,-System.Private.CoreLib")]
[TestCase (ApplePlatform.iOS, "ios-arm64;", "-all")]
[TestCase (ApplePlatform.iOS, "ios-arm64;", "")]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64", "-all,System.Private.CoreLib")]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64", "all,-System.Private.CoreLib")]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64", "-all")]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64", "")]
[TestCase (ApplePlatform.TVOS, "tvos-arm64;", "-all,System.Private.CoreLib")]
[TestCase (ApplePlatform.TVOS, "tvos-arm64;", "all,-System.Private.CoreLib")]
[TestCase (ApplePlatform.TVOS, "tvos-arm64;", "-all")]
[TestCase (ApplePlatform.TVOS, "tvos-arm64;", "")]
[TestCase (ApplePlatform.iOS, "ios-arm64", "-all,System.Private.CoreLib")]
[TestCase (ApplePlatform.iOS, "ios-arm64", "all,-System.Private.CoreLib")]
[TestCase (ApplePlatform.iOS, "ios-arm64", "")]
[TestCase (ApplePlatform.TVOS, "tvos-arm64", "-all,System.Private.CoreLib")]
[TestCase (ApplePlatform.TVOS, "tvos-arm64", "all,-System.Private.CoreLib")]
[TestCase (ApplePlatform.TVOS, "tvos-arm64", "")]
public void DedupEnabledTest (ApplePlatform platform, string runtimeIdentifiers, string mtouchInterpreter)
{
var project = "MySimpleApp";
@ -2045,15 +2039,56 @@ namespace Xamarin.Tests {
DotNet.AssertBuild (project_path, properties);
var objDir = GetObjDir (project_path, platform, runtimeIdentifiers);
if (platform == ApplePlatform.MacCatalyst) {
Assert.True (FindAOTedAssemblyFile (objDir, "aot-instances.dll"), $"Dedup optimization should be enabled for AOT compilation on: {platform} with RID: {runtimeIdentifiers}");
}
[Test]
[TestCase (ApplePlatform.iOS, "iossimulator-x64", "-all,System.Private.CoreLib")]
[TestCase (ApplePlatform.iOS, "iossimulator-x64", "all,-System.Private.CoreLib")]
[TestCase (ApplePlatform.iOS, "iossimulator-x64", "")]
[TestCase (ApplePlatform.TVOS, "tvossimulator-x64", "-all,System.Private.CoreLib")]
[TestCase (ApplePlatform.TVOS, "tvossimulator-x64", "all,-System.Private.CoreLib")]
[TestCase (ApplePlatform.TVOS, "tvossimulator-x64", "")]
public void DedupDisabledTest (ApplePlatform platform, string runtimeIdentifiers, string mtouchInterpreter)
{
var project = "MySimpleApp";
Configuration.IgnoreIfIgnoredPlatform (platform);
Configuration.AssertRuntimeIdentifiersAvailable (platform, runtimeIdentifiers);
var project_path = GetProjectPath (project, runtimeIdentifiers: runtimeIdentifiers, platform: platform, out var appPath);
Clean (project_path);
var properties = GetDefaultProperties (runtimeIdentifiers);
properties ["MtouchInterpreter"] = $"\"{mtouchInterpreter}\"";
DotNet.AssertBuild (project_path, properties);
var objDir = GetObjDir (project_path, platform, runtimeIdentifiers);
Assert.False (FindAOTedAssemblyFile (objDir, "aot-instances.dll"), $"Dedup optimization should not be enabled for AOT compilation on: {platform} with RID: {runtimeIdentifiers}");
}
[Test]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64", "-all,System.Private.CoreLib")]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64", "all,-System.Private.CoreLib")]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64", "")]
public void DedupUniversalAppTest (ApplePlatform platform, string runtimeIdentifiers, string mtouchInterpreter)
{
var project = "MySimpleApp";
Configuration.IgnoreIfIgnoredPlatform (platform);
Configuration.AssertRuntimeIdentifiersAvailable (platform, runtimeIdentifiers);
var project_path = GetProjectPath (project, runtimeIdentifiers: runtimeIdentifiers, platform: platform, out var appPath);
Clean (project_path);
var properties = GetDefaultProperties (runtimeIdentifiers);
properties ["MtouchInterpreter"] = $"\"{mtouchInterpreter}\"";
DotNet.AssertBuild (project_path, properties);
var objDir = GetObjDir (project_path, platform, runtimeIdentifiers);
var objDirMacCatalystArm64 = Path.Combine (objDir, "maccatalyst-arm64");
Assert.True (FindAOTedAssemblyFile (objDirMacCatalystArm64, "aot-instances.dll"), $"Dedup optimization should be enabled for AOT compilation on: {platform} with RID: maccatalyst-arm64");
var objDirMacCatalystx64 = Path.Combine (objDir, "maccatalyst-x64");
Assert.False (FindAOTedAssemblyFile (objDirMacCatalystx64, "aot-instances.dll"), $"Dedup optimization should not be enabled for AOT compilation on: {platform} with RID: maccatalyst-x64");
} else {
Assert.True (FindAOTedAssemblyFile (objDir, "aot-instances.dll"), $"Dedup optimization should be enabled for AOT compilation on: {platform} with RID: {runtimeIdentifiers}");
}
var appExecutable = GetNativeExecutable (platform, appPath);

Просмотреть файл

@ -34,8 +34,7 @@ resources:
source: xamarin-macios-ci
trigger:
branches:
- release/*
- net7.0
- release/8*
- net8.0
- release-test/* # this is for testing the release pipeline on branches without GitHub's branch protection (so we can automate tests without requiring commits to go through pull requests, etc.).
stages: