Skip to content
Open
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
3 changes: 3 additions & 0 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions dotnet/targets/Microsoft.Sdk.Versions.template.props
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@
RuntimePackRuntimeIdentifiers="@RUNTIME_PACK_RUNTIME_IDENTIFIERS@"
Profile="@PLATFORM@"
/>

<!-- Need this until https://github.com/dotnet/sdk/pull/51428 is completed -->
<KnownFrameworkReference Update="Microsoft.NETCore.App" RuntimePackRuntimeIdentifiers="%(RuntimePackRuntimeIdentifiers);ios-arm64;iossimulator-x64;iossimulator-arm64;tvos-arm64;tvossimulator-x64;tvossimulator-arm64;maccatalyst-arm64;maccatalyst-x64" />
</ItemGroup>
</Project>
11 changes: 10 additions & 1 deletion dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1199,9 +1199,11 @@
<_IsDedupEnabled Condition="'$(_IsDedupEnabled)' == '' And '$(_RunAotCompiler)' == 'true' And '$(IsMacEnabled)' == 'true' And '$(TargetArchitectures)' == 'ARM64' And '$(MtouchInterpreter)' != 'all'">true</_IsDedupEnabled>
<_DedupAssembly Condition="'$(_IsDedupEnabled)' == 'true'">$(IntermediateOutputPath)aot-instances.dll</_DedupAssembly>

<!-- This property isn't accurate with CoreCLR, it should probably be renamed to something like '_LibRuntimeLinkMode' at some point -->
<_LibMonoLinkMode Condition="'$(_LibMonoLinkMode)' == '' And '$(UseMonoRuntime)' == 'false'">dylib</_LibMonoLinkMode>
<!-- default to 'static' for Mac Catalyst to work around https://github.com/dotnet/macios/issues/14686 -->
<_LibMonoLinkMode Condition="'$(_LibMonoLinkMode)' == '' And '$(_PlatformName)' == 'MacCatalyst'">static</_LibMonoLinkMode>
<_LibMonoLinkMode Condition="'$(_LibMonoLinkMode)' == '' And ('$(ComputedPlatform)' != 'iPhone' Or '$(_PlatformName)' == 'macOS')">dylib</_LibMonoLinkMode>
<_LibMonoLinkMode Condition="'$(_LibMonoLinkMode)' == '' And '$(ComputedPlatform)' != 'iPhone'">dylib</_LibMonoLinkMode>
<_LibMonoLinkMode Condition="'$(_LibMonoLinkMode)' == ''">static</_LibMonoLinkMode>
<_LibMonoExtension Condition="'$(_LibMonoLinkMode)' == 'dylib'">dylib</_LibMonoExtension>
<_LibMonoExtension Condition="'$(_LibMonoLinkMode)' == 'static'">a</_LibMonoExtension>
Expand Down Expand Up @@ -1245,6 +1247,13 @@
"
/>
</ItemGroup>

<!-- CoreCLR: these are variables currently needed to make CoreCLR work -->
<ItemGroup Condition="'$(UseMonoRuntime)' == 'false' And '$(_PlatformName)' != 'macOS'">
<!-- Only the interpreter works so far, so make sure only the interpreter executes and that everything is executed with the interpreter -->
<_BundlerEnvironmentVariables Include="DOTNET_Interpreter" Value="%2A%21%2A" /> <!-- This is the string "*!*" url encoded -->
<_BundlerEnvironmentVariables Include="DOTNET_ReadyToRun" Value="0" />
</ItemGroup>
</Target>

<!-- App bundle creation tasks -->
Expand Down
3 changes: 3 additions & 0 deletions tests/introspection/ApiPInvokeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion tests/monotouch-test/mono/Symbols.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ 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++) {
/* ves_pinvoke_method (slow path) and do_icall (fast path) are
* 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 ()
Expand Down
13 changes: 13 additions & 0 deletions tests/xharness/Jenkins/TestVariationsFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ IEnumerable<TestData> 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;

switch (test.Platform) {
case TestPlatform.Mac:
Expand Down Expand Up @@ -69,6 +71,17 @@ IEnumerable<TestData> 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 };
}
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 };
yield return new TestData { Variation = "Release (CoreCLR)", TestVariation = "release|coreclr", Ignored = ignore };
}
break;
}

switch (test.ProjectPlatform) {
Expand Down
Loading