diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml
index 9b400f09b0bf8a..fcfec1ceab3141 100644
--- a/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml
+++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml
@@ -206,9 +206,9 @@ jobs:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
parameters:
creator: dotnet-bot
- testBuildArgs: tree baseservices /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:UseNativeAOTRuntime=false /p:BuildTestsOnHelix=false
+ testBuildArgs: /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:UseNativeAOTRuntime=false /p:BuildTestsOnHelix=true
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
- extraHelixArguments: /p:NeedsToBuildAppsOnHelix=false
+ extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
#
# Build the whole product using CoreCLR R2R and run library tests
@@ -234,12 +234,13 @@ jobs:
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'] ]
jobParameters:
testGroup: innerloop
- nameSuffix: AllSubsets_CoreCLR_Smoke
- buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:BuildTestsOnHelix=false /p:UseNativeAOTRuntime=false /p:RunSmokeTestsOnly=true
- timeoutInMinutes: 120
+ nameSuffix: AllSubsets_CoreCLR
+ buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:UseNativeAOTRuntime=false $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=false /p:EnableAggressiveTrimming=true
+ timeoutInMinutes: 240
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
+ extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslikesimulator.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslikesimulator.yml
index 6a55be22171566..b65d86ce4083ad 100644
--- a/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslikesimulator.yml
+++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslikesimulator.yml
@@ -174,12 +174,12 @@ jobs:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
parameters:
creator: dotnet-bot
- testBuildArgs: tree baseservices /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:UseNativeAOTRuntime=false /p:BuildTestsOnHelix=false
+ testBuildArgs: /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:UseNativeAOTRuntime=false /p:BuildTestsOnHelix=true
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
- extraHelixArguments: /p:NeedsToBuildAppsOnHelix=false
+ extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
#
-# Build the whole product using CoreCLR R2R and run library tests
+# Build the whole product using CoreCLR R2R and run libraries tests
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@@ -203,12 +203,13 @@ jobs:
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'] ]
jobParameters:
testGroup: innerloop
- nameSuffix: AllSubsets_CoreCLR_Smoke
- buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:BuildTestsOnHelix=false /p:UseNativeAOTRuntime=false /p:RunSmokeTestsOnly=true
- timeoutInMinutes: 120
+ nameSuffix: AllSubsets_CoreCLR
+ buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:UseNativeAOTRuntime=false /p:BuildTestsOnHelix=true
+ timeoutInMinutes: 240
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
+ extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-maccatalyst.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-maccatalyst.yml
index 233f0788532667..783986f13a73e6 100644
--- a/eng/pipelines/extra-platforms/runtime-extra-platforms-maccatalyst.yml
+++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-maccatalyst.yml
@@ -216,7 +216,8 @@ jobs:
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }}
platforms:
- # - maccatalyst_x64 TODO: https://github.com/dotnet/runtime/issues/120055
+ # Tracking issue: https://github.com/dotnet/runtime/issues/124344
+ # - maccatalyst_x64
- maccatalyst_arm64
variables:
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
@@ -243,11 +244,12 @@ jobs:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
parameters:
creator: dotnet-bot
- testBuildArgs: tree baseservices /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:UseNativeAOTRuntime=false /p:BuildTestsOnHelix=false
+ testBuildArgs: /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:UseNativeAOTRuntime=false /p:BuildTestsOnHelix=true
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
+ extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
#
-# Build the whole product using CoreCLR R2R and run library tests
+# Build the whole product using CoreCLR R2R and run libraries tests
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@@ -258,7 +260,8 @@ jobs:
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isMacCatalystOnlyBuild: ${{ parameters.isMacCatalystOnlyBuild }}
platforms:
- # - maccatalyst_x64 TODO: https://github.com/dotnet/runtime/issues/120055
+ # Tracking issue: https://github.com/dotnet/runtime/issues/124344
+ # - maccatalyst_x64
- maccatalyst_arm64
variables:
# map dependencies variables to local variables
@@ -271,11 +274,12 @@ jobs:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_CoreCLR_Smoke
- buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:BuildTestsOnHelix=false /p:UseNativeAOTRuntime=false /p:RunSmokeTestsOnly=true
- timeoutInMinutes: 120
+ buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:DevTeamProvisioning=adhoc /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:UseNativeAOTRuntime=false /p:BuildTestsOnHelix=true
+ timeoutInMinutes: 240
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
+ extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml
index 301e1a5186f332..15db2cb8fa156f 100644
--- a/eng/pipelines/runtime.yml
+++ b/eng/pipelines/runtime.yml
@@ -1083,7 +1083,7 @@ extends:
eq(variables['isRollingBuild'], true))
#
- # Build the whole product using CoreCLR and run functional tests
+ # Build the whole product using CoreCLR and run libraries tests
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@@ -1105,7 +1105,7 @@ extends:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_CoreCLR_Smoke
- buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:BuildTestsOnHelix=false /p:UseNativeAOTRuntime=false /p:RunSmokeTestsOnly=true
+ buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:UseNativeAOTRuntime=false /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:UsePortableRuntimePack=false
timeoutInMinutes: 120
condition: >-
or(
@@ -1119,6 +1119,7 @@ extends:
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
+ extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
condition: >-
or(
eq(variables['librariesContainsChange'], true),
diff --git a/eng/testing/tests.ioslike.targets b/eng/testing/tests.ioslike.targets
index 0f3302bae3ce2b..5db2b02f21b3b0 100644
--- a/eng/testing/tests.ioslike.targets
+++ b/eng/testing/tests.ioslike.targets
@@ -16,8 +16,10 @@
<_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration)
- <_AOTBuildCommand>$(_AOTBuildCommand) /p:XHARNESS_EXECUTION_DIR="$XHARNESS_EXECUTION_DIR" /p:RunAOTCompilation=$(RunAOTCompilation) /p:UseNativeAOTRuntime=$(UseNativeAOTRuntime) /p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:MonoForceInterpreter=$(MonoForceInterpreter) /p:MonoEnableLLVM=true /p:DevTeamProvisioning=$(DevTeamProvisioning) /p:UsePortableRuntimePack=$(UsePortableRuntimePack) /p:Configuration=$(Configuration)
+ <_AOTBuildCommand>$(_AOTBuildCommand) /p:XHARNESS_EXECUTION_DIR="$XHARNESS_EXECUTION_DIR" /p:RunAOTCompilation=$(RunAOTCompilation) /p:UseNativeAOTRuntime=$(UseNativeAOTRuntime) /p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:UseMonoRuntime=$(UseMonoRuntime) /p:MonoForceInterpreter=$(MonoForceInterpreter) /p:MonoEnableLLVM=true /p:DevTeamProvisioning=$(DevTeamProvisioning) /p:UsePortableRuntimePack=$(UsePortableRuntimePack) /p:Configuration=$(Configuration)
<_AOTBuildCommand Condition="'$(NativeLib)' != ''">$(_AOTBuildCommand) /p:NativeLib=$(NativeLib) /p:BundlesResources=$(BundlesResources) /p:ForceLibraryModeGenerateAppBundle=$(ForceLibraryModeGenerateAppBundle)
+
+ <_AOTBuildCommand Condition="'$(UseMonoRuntime)' != 'true' and '$(UseNativeAOTRuntime)' != 'true'">$(_AOTBuildCommand) /p:PublishReadyToRun=true /p:PublishReadyToRunComposite=true /p:PublishReadyToRunContainerFormat=macho /p:StripSymbols=true
<_AOTBuildCommand>$(_AOTBuildCommand)
<_ResetSimulatorSwitch Condition="('$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvossimulator') and '$(IncludesTestRunner)' == 'true'">--reset-simulator
@@ -38,10 +40,8 @@
$(_AOTBuildCommand) $(_AfterBuildCommands)
-
-
+
+
@@ -132,6 +132,7 @@
<_ApplePropertyNames Include="UseConsoleUITemplate" />
<_ApplePropertyNames Include="UseRuntimeComponents" />
<_ApplePropertyNames Include="_NetCoreAppToolCurrent" />
+ <_ApplePropertyNames Include="DynamicCodeSupport" />
<_ApplePropertyNames Include="HybridGlobalization" />
diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets
index b5e2692bc45fa9..9d1123f03863b0 100644
--- a/eng/testing/tests.mobile.targets
+++ b/eng/testing/tests.mobile.targets
@@ -38,7 +38,8 @@
-
+
+
false
<_DefaultValueAttributeSupport Condition="'$(OverrideDefaultValueAndDesignerHostSupport)' == 'true'">true
<_DesignerHostSupport Condition="'$(OverrideDefaultValueAndDesignerHostSupport)' == 'true'">true
diff --git a/eng/testing/tests.targets b/eng/testing/tests.targets
index 6579ff2f0ba884..c3b67492c40d45 100644
--- a/eng/testing/tests.targets
+++ b/eng/testing/tests.targets
@@ -6,8 +6,9 @@
and '$(UseNativeAOTRuntime)' != 'true'
and '$(TargetOS)' != 'browser'
and '$(TargetOS)' != 'wasi'
- and '$(RuntimeFlavor)' != 'Mono'
+ and '$(TargetOS)' != 'android'
and '$(TargetsAppleMobile)' != 'true'
+ and '$(RuntimeFlavor)' != 'Mono'
and '$(UseRuntimeAsync)' != 'false'">
true
$(Features);runtime-async=on
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs
index fe5efa9f1356e2..15514263abea49 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs
@@ -2374,7 +2374,7 @@ public void ComplexObj_As_Enumerable_Element()
#if !BUILDING_SOURCE_GENERATOR_TESTS
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/91923", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/91923", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
public void TraceSwitchTest()
{
var dic = new Dictionary
@@ -2404,7 +2404,7 @@ private void ValidateGeolocation(IGeolocation location)
[Fact]
#if !BUILDING_SOURCE_GENERATOR_TESTS
[ActiveIssue("Investigate Build browser-wasm linux Release LibraryTests_EAT CI failure for reflection impl", TestPlatforms.Browser)]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/91923", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/91923", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
#endif
public void TestGraphWithUnsupportedMember()
{
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs
index 8ea5551b760f58..a5ee77da175fce 100644
--- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs
+++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs
@@ -15,6 +15,7 @@ public class CompilationLibraryTests
{
// Moq heavily utilizes RefEmit, which does not work on most aot workloads
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))]
public void ResolveReferencePathsAcceptsCustomResolvers()
{
var fail = new Mock();
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs
index b694513cc4d510..647d060468487e 100644
--- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs
+++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs
@@ -16,6 +16,7 @@ public class CompositeResolverTests
{
// Moq heavily utilizes RefEmit, which does not work on most aot workloads
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))]
public void ReturnsFirstSuccessfulResolve()
{
var fail = new Mock();
@@ -47,6 +48,7 @@ public void ReturnsFirstSuccessfulResolve()
// Moq heavily utilizes RefEmit, which does not work on most aot workloads
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))]
public void PassesLibraryToAllResolvers()
{
var fail = new Mock();
@@ -68,6 +70,7 @@ public void PassesLibraryToAllResolvers()
// Moq heavily utilizes RefEmit, which does not work on most aot workloads
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))]
public void PopulatedAssemblies()
{
var fail = new Mock();
diff --git a/src/libraries/Microsoft.VisualBasic.Core/tests/ErrObjectTests.cs b/src/libraries/Microsoft.VisualBasic.Core/tests/ErrObjectTests.cs
index 61a1f8c4b66fbd..1d11cfa92aedb2 100644
--- a/src/libraries/Microsoft.VisualBasic.Core/tests/ErrObjectTests.cs
+++ b/src/libraries/Microsoft.VisualBasic.Core/tests/ErrObjectTests.cs
@@ -12,6 +12,7 @@ public class ErrObjectTests
[Fact]
[ActiveIssue("https://github.com/mono/mono/issues/14854", typeof(PlatformDetection), nameof(PlatformDetection.IsSingleFile))]
[ActiveIssue("https://github.com/mono/mono/issues/14854", TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))]
public void Clear()
{
ProjectData.ClearProjectError();
diff --git a/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs b/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs
index 956362d2383052..ab6dafc1aee5fd 100644
--- a/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs
+++ b/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs
@@ -96,7 +96,7 @@ public static IEnumerable
-
+
true
true
macho
@@ -61,8 +61,9 @@
This can be removed once we upstream Mach-O support in the targets to the SDK -->
+ ResolveRuntimeFilesFromLocalBuild
$(AfterMicrosoftNETSdkTargets);$(Crossgen2SdkOverrideTargetsPath)
- $(AfterMicrosoftNETSdkTargets);$(MonoProjectRoot)\msbuild\apple\build\AppleBuild.ReadyToRun.targets
+ $(AfterMicrosoftNETSdkTargets);$(MSBuildThisFileDirectory)AppleBuild.ReadyToRun.targets
diff --git a/src/mono/msbuild/apple/data/ProxyProjectForAOTOnHelix.proj b/src/mono/msbuild/apple/data/ProxyProjectForAOTOnHelix.proj
index 2035333122a2f0..309d5b97a52cdc 100644
--- a/src/mono/msbuild/apple/data/ProxyProjectForAOTOnHelix.proj
+++ b/src/mono/msbuild/apple/data/ProxyProjectForAOTOnHelix.proj
@@ -7,7 +7,7 @@
$([MSBuild]::NormalizeDirectory($(TestRootDir), '..', 'extraFiles'))
$([MSBuild]::NormalizeDirectory($(TestRootDir), '..', 'obj'))
- _PublishRuntimePack;_PrepareForAppleBuildAppOnHelix;$(AppleBuildDependsOn);_AfterAppleBuildOnHelix
+ _PublishRuntimePack;_PrepareForAppleBuildAppOnHelix;_RunR2RCompilationOnHelix;$(AppleBuildDependsOn);_AfterAppleBuildOnHelix
true
$(OriginalPublishDir)
@@ -96,6 +96,64 @@
+
+
+
+
+
+ <_R2ROutputPath>$(IntermediateOutputPath)R2R
+
+
+
+ <_R2RCompiledAssemblies Include="$(_R2ROutputPath)\*.dll" />
+ <_R2RDylibFiles Include="$(_R2ROutputPath)\*.r2r.dylib" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BaseIntermediateOutputPath)
+ $(TargetOS)-$(TargetArchitecture)
+
+
+
+
+ <_R2RPublishAssembly Include="$(OriginalPublishDir)*.dll" Exclude="$(OriginalPublishDir)*.resources.dll" />
+
+
+
+
+ %(Filename)%(Extension)
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/mono/msbuild/common/RuntimeComponentManifest.targets b/src/mono/msbuild/common/RuntimeComponentManifest.targets
index fcf1ff70d9a8f5..267df0c44c980b 100644
--- a/src/mono/msbuild/common/RuntimeComponentManifest.targets
+++ b/src/mono/msbuild/common/RuntimeComponentManifest.targets
@@ -1,10 +1,10 @@
-
+
- <_MonoRuntimeComponentManifestJsonFilePath
+ <_MonoRuntimeComponentManifestJsonFilePath
Condition="'$(_MonoRuntimeComponentManifestJsonFilePath)' == '' and '%(ResolvedFrameworkReference.Identity)' == 'Microsoft.NETCore.App'">$([MSBuild]::NormalizePath('%(RuntimePackPath)', 'runtimes', '$(RuntimeIdentifier)', 'build', 'RuntimeComponentManifest.json'))
@@ -69,7 +69,7 @@
Such a workload should then use DontLink to exclude the disabled components. On the other
hand a workload that explicitly picks the native libraries from native/ should use
_MonoRuntimeComponentLink to pick just the needed runtime component artifacts. -->
-
+
diff --git a/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj b/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
index 1a6f333f72d2d6..50c08de42e0b37 100644
--- a/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
+++ b/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
@@ -2,6 +2,7 @@
$(NetCoreAppToolCurrent)
+ true
$(NoWarn),CA1050,CA1850
$(DefaultExcludesInProjectFolder);Templates\*.*
diff --git a/src/tasks/AppleAppBuilder/Templates/runtime-coreclr.m b/src/tasks/AppleAppBuilder/Templates/runtime-coreclr.m
index 938de5423105c6..10b0e44e5d437e 100644
--- a/src/tasks/AppleAppBuilder/Templates/runtime-coreclr.m
+++ b/src/tasks/AppleAppBuilder/Templates/runtime-coreclr.m
@@ -196,25 +196,32 @@ bool get_native_code_data(const struct host_runtime_contract_native_code_context
char contract_str[19]; // 0x + 16 hex digits + '\0'
snprintf(contract_str, 19, "0x%zx", (size_t)(&host_contract));
- // TODO: set TRUSTED_PLATFORM_ASSEMBLIES, APP_PATHS and NATIVE_DLL_SEARCH_DIRECTORIES
- const char *appctx_keys [] = {
- "RUNTIME_IDENTIFIER",
- "APP_CONTEXT_BASE_DIRECTORY",
- "TRUSTED_PLATFORM_ASSEMBLIES",
- "HOST_RUNTIME_CONTRACT",
+#if defined(INVARIANT_GLOBALIZATION)
+#define PROPERTY_COUNT %AppContextPropertyCount_InvariantGlobalization%
+#else
+#define PROPERTY_COUNT %AppContextPropertyCount%
+#endif
+
+ // Hardcoded properties + runtime config properties (generated at build time)
+ const char *appctx_keys[PROPERTY_COUNT];
+ appctx_keys[0] = "RUNTIME_IDENTIFIER";
+ appctx_keys[1] = "APP_CONTEXT_BASE_DIRECTORY";
+ appctx_keys[2] = "TRUSTED_PLATFORM_ASSEMBLIES";
+ appctx_keys[3] = "HOST_RUNTIME_CONTRACT";
#if !defined(INVARIANT_GLOBALIZATION)
- "ICU_DAT_FILE_PATH"
+ appctx_keys[4] = "ICU_DAT_FILE_PATH";
#endif
- };
- const char *appctx_values [] = {
- APPLE_RUNTIME_IDENTIFIER,
- bundle,
- compute_trusted_platform_assemblies(),
- contract_str,
+%AppContextKeys%
+
+ const char *appctx_values[PROPERTY_COUNT];
+ appctx_values[0] = APPLE_RUNTIME_IDENTIFIER;
+ appctx_values[1] = bundle;
+ appctx_values[2] = compute_trusted_platform_assemblies();
+ appctx_values[3] = contract_str;
#if !defined(INVARIANT_GLOBALIZATION)
- icu_dat_path
+ appctx_values[4] = icu_dat_path;
#endif
- };
+%AppContextValues%
const char* executable = "%EntryPointLibName%";
const char *executablePath = [[[[NSBundle mainBundle] executableURL] path] UTF8String];
diff --git a/src/tasks/AppleAppBuilder/Xcode.cs b/src/tasks/AppleAppBuilder/Xcode.cs
index e644aefc6ed498..89d4f19a4102db 100644
--- a/src/tasks/AppleAppBuilder/Xcode.cs
+++ b/src/tasks/AppleAppBuilder/Xcode.cs
@@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using System.Reflection.Metadata;
using System.Text;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
@@ -621,12 +622,18 @@ public string GenerateCMake(
File.WriteAllText(Path.Combine(binDir, "host_runtime_contract.h"),
Utils.GetEmbeddedResource("host_runtime_contract.h"));
+ var (appContextKeys, appContextValues, propertyCount, propertyCountInvariant) = RenderCoreClrRuntimeConfigProperties(workspace);
+
// NOTE: Library mode is not supported yet
File.WriteAllText(Path.Combine(binDir, "runtime.m"),
Utils.GetEmbeddedResource("runtime-coreclr.m")
.Replace("//%APPLE_RUNTIME_IDENTIFIER%", RuntimeIdentifier)
.Replace("%EntryPointLibName%", Path.GetFileName(entryPointLib))
- .Replace("%EnvVariables%", envVariables));
+ .Replace("%EnvVariables%", envVariables)
+ .Replace("%AppContextPropertyCount%", propertyCount.ToString())
+ .Replace("%AppContextPropertyCount_InvariantGlobalization%", propertyCountInvariant.ToString())
+ .Replace("%AppContextKeys%", appContextKeys)
+ .Replace("%AppContextValues%", appContextValues));
}
}
@@ -756,4 +763,78 @@ public static string GetAppPath(string appDirectory, string xcodePrjPath)
{
return Path.Combine(appDirectory, Path.GetFileNameWithoutExtension(xcodePrjPath) + ".app");
}
+
+ private (string appContextKeys, string appContextValues, int propertyCount, int propertyCountInvariant) RenderCoreClrRuntimeConfigProperties(string workspace)
+ {
+ Dictionary configProperties = ParseRuntimeConfigProperties(workspace);
+
+ // Hardcoded properties count:
+ // - RUNTIME_IDENTIFIER, APP_CONTEXT_BASE_DIRECTORY, TRUSTED_PLATFORM_ASSEMBLIES, HOST_RUNTIME_CONTRACT = 4
+ // - ICU_DAT_FILE_PATH (only when !INVARIANT_GLOBALIZATION) = 1
+ const int hardcodedPropertiesWithIcu = 5;
+ const int hardcodedPropertiesWithoutIcu = 4;
+
+ var appContextKeys = new StringBuilder();
+ var appContextValues = new StringBuilder();
+
+ int i = 0;
+ foreach ((string key, string value) in configProperties)
+ {
+ appContextKeys.AppendLine($"#if defined(INVARIANT_GLOBALIZATION)");
+ appContextKeys.AppendLine($" appctx_keys[{i + hardcodedPropertiesWithoutIcu}] = \"{key}\";");
+ appContextKeys.AppendLine($"#else");
+ appContextKeys.AppendLine($" appctx_keys[{i + hardcodedPropertiesWithIcu}] = \"{key}\";");
+ appContextKeys.AppendLine($"#endif");
+
+ appContextValues.AppendLine($"#if defined(INVARIANT_GLOBALIZATION)");
+ appContextValues.AppendLine($" appctx_values[{i + hardcodedPropertiesWithoutIcu}] = \"{value}\";");
+ appContextValues.AppendLine($"#else");
+ appContextValues.AppendLine($" appctx_values[{i + hardcodedPropertiesWithIcu}] = \"{value}\";");
+ appContextValues.AppendLine($"#endif");
+ i++;
+ }
+
+ int propertyCount = hardcodedPropertiesWithIcu + configProperties.Count;
+ int propertyCountInvariant = hardcodedPropertiesWithoutIcu + configProperties.Count;
+
+ return (appContextKeys.ToString().TrimEnd(), appContextValues.ToString().TrimEnd(), propertyCount, propertyCountInvariant);
+ }
+
+ private Dictionary ParseRuntimeConfigProperties(string workspace)
+ {
+ var configProperties = new Dictionary();
+ string runtimeConfigPath = Path.Combine(workspace, "runtimeconfig.bin");
+
+ if (!File.Exists(runtimeConfigPath))
+ {
+ return configProperties;
+ }
+
+ try
+ {
+ byte[] fileBytes = File.ReadAllBytes(runtimeConfigPath);
+ unsafe
+ {
+ fixed (byte* ptr = fileBytes)
+ {
+ var blobReader = new BlobReader(ptr, fileBytes.Length);
+
+ int count = blobReader.ReadCompressedInteger();
+
+ for (int i = 0; i < count; i++)
+ {
+ string key = blobReader.ReadSerializedString() ?? string.Empty;
+ string value = blobReader.ReadSerializedString() ?? string.Empty;
+ configProperties[key] = value;
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Logger.LogMessage(MessageImportance.High, $"Error while parsing runtime config at {runtimeConfigPath}: {ex.Message}");
+ }
+
+ return configProperties;
+ }
}
diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj
index 7a9ff200f57fe1..cc261646555edf 100644
--- a/src/tests/Common/helixpublishwitharcade.proj
+++ b/src/tests/Common/helixpublishwitharcade.proj
@@ -872,6 +872,8 @@
Destination="build/BuildIntegration" />
+