diff --git a/Make.config b/Make.config index 701b297e8dd2..8ae5e595a9fa 100644 --- a/Make.config +++ b/Make.config @@ -433,6 +433,7 @@ DOTNET_PLATFORMS= ifdef INCLUDE_IOS DOTNET_PLATFORMS+=iOS +DOTNET_CORECLR_PLATFORMS+=iOS DOTNET_MONOVM_PLATFORMS+=iOS DOTNET_NATIVEAOT_PLATFORMS+=iOS DOTNET_IOS_RUNTIME_IDENTIFIERS_NO_ARCH=ios @@ -458,6 +459,7 @@ endif # INCLUDE_IOS ifdef INCLUDE_TVOS DOTNET_PLATFORMS+=tvOS +DOTNET_CORECLR_PLATFORMS+=tvOS DOTNET_MONOVM_PLATFORMS+=tvOS DOTNET_NATIVEAOT_PLATFORMS+=tvOS DOTNET_TVOS_RUNTIME_IDENTIFIERS_NO_ARCH=tvos @@ -483,6 +485,7 @@ endif ifdef INCLUDE_MACCATALYST DOTNET_PLATFORMS+=MacCatalyst +DOTNET_CORECLR_PLATFORMS+=MacCatalyst DOTNET_MONOVM_PLATFORMS+=MacCatalyst DOTNET_NATIVEAOT_PLATFORMS+=MacCatalyst DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS_NO_ARCH=maccatalyst diff --git a/dotnet/targets/Microsoft.Sdk.Versions.template.props b/dotnet/targets/Microsoft.Sdk.Versions.template.props index 93dd8c43fcb0..c71200a33257 100644 --- a/dotnet/targets/Microsoft.Sdk.Versions.template.props +++ b/dotnet/targets/Microsoft.Sdk.Versions.template.props @@ -43,5 +43,8 @@ RuntimePackRuntimeIdentifiers="@RUNTIME_PACK_RUNTIME_IDENTIFIERS@" Profile="@PLATFORM@" /> + + + diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index c545cadcee69..b997fbac4bf3 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -1199,9 +1199,11 @@ <_IsDedupEnabled Condition="'$(_IsDedupEnabled)' == '' And '$(_RunAotCompiler)' == 'true' And '$(IsMacEnabled)' == 'true' And '$(TargetArchitectures)' == 'ARM64' And '$(MtouchInterpreter)' != 'all'">true <_DedupAssembly Condition="'$(_IsDedupEnabled)' == 'true'">$(IntermediateOutputPath)aot-instances.dll + + <_LibMonoLinkMode Condition="'$(_LibMonoLinkMode)' == '' And '$(UseMonoRuntime)' == 'false'">dylib <_LibMonoLinkMode Condition="'$(_LibMonoLinkMode)' == '' And '$(_PlatformName)' == 'MacCatalyst'">static - <_LibMonoLinkMode Condition="'$(_LibMonoLinkMode)' == '' And ('$(ComputedPlatform)' != 'iPhone' Or '$(_PlatformName)' == 'macOS')">dylib + <_LibMonoLinkMode Condition="'$(_LibMonoLinkMode)' == '' And '$(ComputedPlatform)' != 'iPhone'">dylib <_LibMonoLinkMode Condition="'$(_LibMonoLinkMode)' == ''">static <_LibMonoExtension Condition="'$(_LibMonoLinkMode)' == 'dylib'">dylib <_LibMonoExtension Condition="'$(_LibMonoLinkMode)' == 'static'">a @@ -1245,6 +1247,13 @@ " /> + + + + + <_BundlerEnvironmentVariables Include="DOTNET_Interpreter" Value="%2A%21%2A" /> + <_BundlerEnvironmentVariables Include="DOTNET_ReadyToRun" Value="0" /> + diff --git a/tests/introspection/ApiPInvokeTest.cs b/tests/introspection/ApiPInvokeTest.cs index 5dee89e4e240..1a88902eb667 100644 --- a/tests/introspection/ApiPInvokeTest.cs +++ b/tests/introspection/ApiPInvokeTest.cs @@ -255,6 +255,9 @@ protected void Check (Assembly a) case "System.Net.Security.Native": path = null; break; + case "QCall": + // These symbols are inside libcoreclr.dylib, but they're private, so dlsym won't see them. + continue; } var lib = Dlfcn.dlopen (path, 0); diff --git a/tests/monotouch-test/mono/Symbols.cs b/tests/monotouch-test/mono/Symbols.cs index b66f5acb0800..34e300f086f6 100644 --- a/tests/monotouch-test/mono/Symbols.cs +++ b/tests/monotouch-test/mono/Symbols.cs @@ -16,6 +16,7 @@ public void FunctionNames () bool nativeaot = symbols [1].Contains ("MonoTouchFixtures_Symbols__Collect"); bool llvmonly = symbols [1].Contains ("mono_llvmonly_runtime_invoke"); // LLVM inlines the Collect function, so 'Collect' doesn't show up in the stack trace :/ bool interp = false; + bool coreclr = false; if (!aot) { for (int i = 0; i < 5 && !interp; i++) { @@ -23,10 +24,12 @@ public void FunctionNames () * MONO_NEVER_INLINE, so they should show up in the backtrace * reliably */ interp |= symbols [i].Contains ("ves_pinvoke_method") || symbols [i].Contains ("do_icall"); + + coreclr |= symbols [i].Contains ("ExecuteInterpretedMethod"); } } - Assert.IsTrue (aot || interp || llvmonly || nativeaot, $"#1\n\t{string.Join ("\n\t", symbols)}"); + Assert.IsTrue (aot || interp || llvmonly || nativeaot || coreclr, $"#1\n\t{string.Join ("\n\t", symbols)}"); } void Collect () diff --git a/tests/xharness/Jenkins/TestVariationsFactory.cs b/tests/xharness/Jenkins/TestVariationsFactory.cs index c6bf837625ed..8e3c76fa0020 100644 --- a/tests/xharness/Jenkins/TestVariationsFactory.cs +++ b/tests/xharness/Jenkins/TestVariationsFactory.cs @@ -36,6 +36,10 @@ IEnumerable GetTestData (RunTestTask test) var x64_runtime_identifier = string.Empty; var arm64_sim_runtime_identifier = string.Empty; var x64_sim_runtime_identifier = string.Empty; + var supports_mono = test.Platform != TestPlatform.Mac; + var supports_coreclr = true; + var coreclr_works = Harness.CanRunArm64 || test.Platform == TestPlatform.Mac; // ignore tests on x64 until https://github.com/dotnet/runtime/issues/121631 + var ignore_coreclr = coreclr_works ? ignore : true; switch (test.Platform) { case TestPlatform.Mac: @@ -69,6 +73,17 @@ IEnumerable GetTestData (RunTestTask test) } } break; + case "introspection": + if (supports_coreclr && supports_mono) { // we only need specific coreclr test if we *also* support mono (otherwise the default test will be coreclr) + yield return new TestData { Variation = "CoreCLR", TestVariation = "coreclr", Ignored = ignore_coreclr }; + } + break; + case "monotouch-test": + if (supports_coreclr && supports_mono) { // we only need specific coreclr test if we *also* support mono (otherwise the default test will be coreclr) + yield return new TestData { Variation = "Debug (CoreCLR)", TestVariation = "debug|coreclr", Ignored = ignore_coreclr }; + yield return new TestData { Variation = "Release (CoreCLR)", TestVariation = "release|coreclr", Ignored = ignore_coreclr }; + } + break; } switch (test.ProjectPlatform) {