Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
filipnavara committed Sep 2, 2023
1 parent d8e4700 commit f90f749
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/mono/msbuild/apple/build/AppleBuild.InTree.targets
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
<Import Project="$(MSBuildThisFileDirectory)AppleBuild.targets" />

<!-- Workaround for SDK not knowing about CoreCLR iOS runtime packs -->
<ItemGroup>
<KnownFrameworkReference Update="Microsoft.NETCore.App"
RuntimePackRuntimeIdentifiers="%(KnownFrameworkReference.RuntimePackRuntimeIdentifiers);iossimulator-arm64;iossimulator-x64;tvossimulator-arm64;tvossimulator-x64;maccatalyst-arm64;maccatalyst-x64"
Condition="'$(UseMonoRuntime)' == 'false'" />
</ItemGroup>
<Target Name="UpdateKnownFrameworkReference" BeforeTargets="ProcessFrameworkReferences">
<ItemGroup>
<KnownFrameworkReference Update="Microsoft.NETCore.App"
RuntimePackRuntimeIdentifiers="%(KnownFrameworkReference.RuntimePackRuntimeIdentifiers);iossimulator-arm64;iossimulator-x64;tvossimulator-arm64;tvossimulator-x64;maccatalyst-arm64;maccatalyst-x64"
Condition="'$(UseMonoRuntime)' == 'false'" />
</ItemGroup>
</Target>

<!-- Use local runtime pack -->
<Target Name="UpdateRuntimePack" AfterTargets="ResolveFrameworkReferences" Condition="'$(PublishAotUsingRuntimePack)' != 'true'">
Expand Down
4 changes: 2 additions & 2 deletions src/tasks/AppleAppBuilder/AppleAppBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public void ValidateRuntimeSelection()
if (!string.IsNullOrEmpty(MonoRuntimeHeaders))
throw new ArgumentException($"Property \"{nameof(MonoRuntimeHeaders)}\" is not supported with {Runtime} runtime and will be ignored.");

if (!string.IsNullOrEmpty(MainLibraryFileName) && Runtime == "NativeAOT")
if (!string.IsNullOrEmpty(MainLibraryFileName) && targetRuntime == TargetRuntime.NativeAOT)
throw new ArgumentException($"Property \"{nameof(MainLibraryFileName)}\" is not supported with {Runtime} runtime and will be ignored.");

if (ForceInterpreter)
Expand All @@ -213,7 +213,7 @@ public void ValidateRuntimeSelection()
if (ForceAOT)
throw new ArgumentException($"Property \"{nameof(ForceAOT)}\" is not supported with {Runtime} runtime and will be ignored.");

if (!string.IsNullOrEmpty(RuntimeComponents) && Runtime == "NativeAOT")
if (!string.IsNullOrEmpty(RuntimeComponents) && targetRuntime == TargetRuntime.NativeAOT)
throw new ArgumentException($"Property \"{nameof(RuntimeComponents)}\" is not supported with {Runtime} runtime and will be ignored.");

if (!string.IsNullOrEmpty(DiagnosticPorts))
Expand Down

0 comments on commit f90f749

Please sign in to comment.