Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
6 changes: 3 additions & 3 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@
<ProjectExclusions Include="$(RepoRoot)/src/tests/FunctionalTests/iOS/Simulator/LibraryMode/iOS.Simulator.LibraryMode.Test.csproj" />
</ItemGroup>

<ItemGroup Condition="('$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvossimulator') and ('$(RuntimeFlavor)' == 'Mono' or '$(UseNativeAOTRuntime)' == 'true') and '$(RunDisablediOSTests)' != 'true'">
<ProjectExclusions Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\Simulator\CoreCLR.Interpreter\*.Test.csproj" />
<ItemGroup Condition="('$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator') and ('$(RuntimeFlavor)' == 'Mono' or '$(UseNativeAOTRuntime)' == 'true') and '$(RunDisablediOSTests)' != 'true'">
<ProjectExclusions Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\Simulator\CoreCLR\*.Test.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(RunDisabledWasmTests)' != 'true' and '$(RunAOTCompilation)' != 'true'">
Expand Down Expand Up @@ -631,7 +631,7 @@

<ItemGroup Condition="('$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator' or '$(TargetOS)' == 'maccatalyst') and '$(RuntimeFlavor)' == 'CoreCLR' and '$(UseNativeAOTRuntime)' != 'true'">
<SmokeTestProject Remove="@(SmokeTestProject)" />
<SmokeTestProject Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\Simulator\CoreCLR.Interpreter\*.Test.csproj"/>
<SmokeTestProject Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\Simulator\CoreCLR\*.Test.csproj"/>
</ItemGroup>

<!--
Expand Down
15 changes: 0 additions & 15 deletions src/mono/msbuild/apple/build/AppleBuild.InTree.targets
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,4 @@
</ItemGroup>
<Message Text="Used runtime pack: %(ResolvedRuntimePack.PackageDirectory)" Importance="high" />
</Target>

<!-- Override the ResolveReadyToRunCompilers target to use the in-build crossgen2.
This needs to be imported after SDK targets, so any project requiring this should set AfterMicrosoftNETSdkTargets -->
<Target Name="ResolveReadyToRunCompilers" Condition="'$(PublishReadyToRun)' == true" DependsOnTargets="ResolveRuntimeFilesFromLocalBuild">
<PropertyGroup>
<Crossgen2Path>$([MSBuild]::NormalizePath('$(Crossgen2InBuildDir)', 'crossgen2$(ExeSuffix)'))</Crossgen2Path>
</PropertyGroup>

<ItemGroup>
<Crossgen2Tool Include="$(Crossgen2Path)"
TargetArch="$(TargetArchitecture)"
TargetOS="$(TargetOS)"
PerfmapFormatVersion="$(PublishReadyToRunPerfmapFormatVersion)"/>
</ItemGroup>
</Target>
</Project>
17 changes: 17 additions & 0 deletions src/mono/msbuild/apple/build/AppleBuild.ReadyToRun.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project>
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/119006
Override the ResolveReadyToRunCompilers target to use the in-build crossgen2.
This needs to be imported after SDK targets, so any project requiring this should set AfterMicrosoftNETSdkTargets -->
<Target Name="ResolveReadyToRunCompilers" Condition="'$(PublishReadyToRun)' == true" DependsOnTargets="ResolveRuntimeFilesFromLocalBuild">
<PropertyGroup>
<Crossgen2Path>$([MSBuild]::NormalizePath('$(Crossgen2InBuildDir)', 'crossgen2$(ExeSuffix)'))</Crossgen2Path>
</PropertyGroup>

<ItemGroup>
<Crossgen2Tool Include="$(Crossgen2Path)"
TargetArch="$(TargetArchitecture)"
TargetOS="$(TargetOS)"
PerfmapFormatVersion="$(PublishReadyToRunPerfmapFormatVersion)"/>
</ItemGroup>
</Target>
</Project>
18 changes: 18 additions & 0 deletions src/mono/msbuild/apple/build/AppleBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@
<MonoForceInterpreter Condition="'$(MonoForceInterpreter)' == ''">true</MonoForceInterpreter>
</PropertyGroup>

<PropertyGroup Condition="'$(PublishReadyToRun)' == 'true' and '$(UseMonoRuntime)' != 'true'">
<PublishReadyToRunComposite>true</PublishReadyToRunComposite>
<PublishReadyToRunContainerFormat>macho</PublishReadyToRunContainerFormat>
</PropertyGroup>

<ItemGroup Condition="'$(PublishReadyToRun)' != 'true' and '$(UseMonoRuntime)' != 'true'">
<EnvironmentVariables Include="DOTNET_ReadyToRun=0" />
</ItemGroup>

<!-- Tracking issue: https://github.com/dotnet/runtime/issues/119006
ReadyToRun settings for CoreCLR on Apple platforms.
This can be removed once we upstream Mach-O support in the targets to the SDK -->
<Import Project="$(Crossgen2SdkOverridePropsPath)" Condition="'$(PublishReadyToRun)' == 'true' and '$(UseMonoRuntime)' != 'true' and '$(Crossgen2SdkOverridePropsPath)' != ''" />
<PropertyGroup Condition="'$(PublishReadyToRun)' == 'true' and '$(UseMonoRuntime)' != 'true'">
<AfterMicrosoftNETSdkTargets Condition="'$(Crossgen2SdkOverrideTargetsPath)' != ''">$(AfterMicrosoftNETSdkTargets);$(Crossgen2SdkOverrideTargetsPath)</AfterMicrosoftNETSdkTargets>
<AfterMicrosoftNETSdkTargets>$(AfterMicrosoftNETSdkTargets);$(MonoProjectRoot)\msbuild\apple\build\AppleBuild.ReadyToRun.targets</AfterMicrosoftNETSdkTargets>
</PropertyGroup>

<PropertyGroup>
<iOSLikeDedup Condition="'$(iOSLikeDedup)' == '' and '$(RunAOTCompilation)' == 'true' and '$(MonoForceInterpreter)' != 'true'">true</iOSLikeDedup>
<RuntimeIdentifier>$(TargetOS)-$(TargetArchitecture.ToLowerInvariant())</RuntimeIdentifier>
Expand Down
13 changes: 0 additions & 13 deletions src/mono/sample/iOS/Program.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,11 @@
<BuildAppBundleDependsOnTargets Condition="'$(ArchiveTests)' == 'true'">Publish</BuildAppBundleDependsOnTargets>
</PropertyGroup>

<PropertyGroup Condition="'$(PublishReadyToRun)' == 'true' and '$(UseMonoRuntime)' != 'true'">
<PublishReadyToRunComposite>true</PublishReadyToRunComposite>
<PublishReadyToRunContainerFormat>macho</PublishReadyToRunContainerFormat>
</PropertyGroup>

<ItemGroup>
<RuntimeComponents Condition="'$(DiagnosticPorts)' != ''" Include="diagnostics_tracing" />
</ItemGroup>

<!-- Use the repo's CrossGen props/targets.
This can be removed once we upstream Mach-O support in the targets to the SDK -->
<Import Project="$(Crossgen2SdkOverridePropsPath)" Condition="'$(PublishReadyToRun)' == 'true' and '$(Crossgen2SdkOverridePropsPath)' != ''" />
<Import Project="$(MonoProjectRoot)\msbuild\apple\build\AppleBuild.props" />
<PropertyGroup>
<!-- Import after SDK targets in order to override R2R-related targets in the SDK -->
<AfterMicrosoftNETSdkTargets Condition="'$(PublishReadyToRun)' == 'true' and '$(Crossgen2SdkOverrideTargetsPath)' != ''">$(Crossgen2SdkOverrideTargetsPath)</AfterMicrosoftNETSdkTargets>
<AfterMicrosoftNETSdkTargets>$(AfterMicrosoftNETSdkTargets);$(MonoProjectRoot)\msbuild\apple\build\AppleBuild.InTree.targets</AfterMicrosoftNETSdkTargets>
</PropertyGroup>

<Target Name="BuildAppBundle" AfterTargets="$(BuildAppBundleAfterTargets)" DependsOnTargets="$(BuildAppBundleDependsOnTargets)"/>
<Target Name="_SetAppleGenerateAppBundleProps" Condition="'$(TargetOS)' != 'ios' and '$(ArchiveTests)' != 'true'" BeforeTargets="_AppleGenerateAppBundle">
Expand Down
2 changes: 1 addition & 1 deletion src/tests/FunctionalTests/iOS/Device/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
</PropertyGroup>

<Import Project="..\..\..\..\libraries\Directory.Build.props" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@
<TestRuntime>true</TestRuntime>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<TargetOS Condition="'$(TargetOS)' == ''">iossimulator</TargetOS>
<MainLibraryFileName>iOS.Simulator.CoreCLR.Interpreter.Test.dll</MainLibraryFileName>
<MainLibraryFileName>iOS.CoreCLR.Interpreter.Test.dll</MainLibraryFileName>
<IncludesTestRunner>false</IncludesTestRunner>
<ExpectedExitCode>42</ExpectedExitCode>
</PropertyGroup>

<ItemGroup>
<EnvironmentVariables Include="DOTNET_InterpMode=3" />
</ItemGroup>

<ItemGroup>
<Compile Include="Program.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<UseMonoRuntime>false</UseMonoRuntime>
<MonoForceInterpreter>false</MonoForceInterpreter>
<RunAOTCompilation>false</RunAOTCompilation>
<TestRuntime>true</TestRuntime>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<TargetOS Condition="'$(TargetOS)' == ''">iossimulator</TargetOS>
<MainLibraryFileName>iOS.CoreCLR.R2R.Test.dll</MainLibraryFileName>
<IncludesTestRunner>false</IncludesTestRunner>
<ExpectedExitCode>42</ExpectedExitCode>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>

<ItemGroup>
<Compile Include="Program.cs" />
</ItemGroup>
</Project>
Loading