Skip to content

Commit

Permalink
eng/targetingpack.targets: Add wasi-wasm only for the latest tfm
Browse files Browse the repository at this point in the history
addresses review feedback from @ viktorhofer .
  • Loading branch information
radical committed Jan 10, 2024
1 parent e26b92d commit 238ccec
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions eng/targetingpacks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@
RuntimeFrameworkName="$(LocalFrameworkOverrideName)"
LatestRuntimeFrameworkVersion="$(ProductVersion)"
RuntimePackNamePatterns="$(LocalFrameworkOverrideName).Runtime.Mono.**RID**"
RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;browser-wasm;wasi-wasm;ios-arm64;ios-arm;iossimulator-arm64;iossimulator-x64;iossimulator-x86;tvos-arm64;tvossimulator-arm64;tvossimulator-x64;maccatalyst-x64;maccatalyst-arm64;android-arm64;android-arm;android-x64;android-x86"
RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;browser-wasm;ios-arm64;ios-arm;iossimulator-arm64;iossimulator-x64;iossimulator-x86;tvos-arm64;tvossimulator-arm64;tvossimulator-x64;maccatalyst-x64;maccatalyst-arm64;android-arm64;android-arm;android-x64;android-x86"
RuntimePackLabels="Mono"
Condition="'$(UseLocalTargetingRuntimePack)' == 'true' and ('@(KnownRuntimePack)' == '' or @(KnownRuntimePack->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('RuntimePackLabels', 'Mono')->WithMetadataValue('TargetFramework', '$(NetCoreAppCurrent)')) == '')" />
<!-- always add wasi-wasm as it is never added by the sdk -->
<KnownRuntimePack Update="@(KnownRuntimePack->WithMetadataValue('Identity', '$(LocalFrameworkOverrideName)')->WithMetadataValue('RuntimePackLabels', 'Mono')->WithMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))"
RuntimePackRuntimeIdentifiers="%(RuntimePackRuntimeIdentifiers);wasi-wasm"
Condition="'$(UseLocalTargetingRuntimePack)' == 'true'" />
<KnownRuntimePack Include="$(LocalFrameworkOverrideName)"
TargetFramework="$(NetCoreAppCurrent)"
RuntimeFrameworkName="$(LocalFrameworkOverrideName)"
Expand Down Expand Up @@ -188,13 +192,4 @@
DotNetHostPath="$(DotNetTool)" />
</ItemGroup>
</Target>

<Target Name="UpdateRuntimePackToAddWasiRID" BeforeTargets="ProcessFrameworkReferences">
<!-- Always add wasi-wasm since it isn't added by sdk at all -->
<ItemGroup>
<KnownRuntimePack Update="$(LocalFrameworkOverrideName)"
RuntimePackRuntimeIdentifiers="%(RuntimePackRuntimeIdentifiers);wasi-wasm"
Condition="'$(UseLocalTargetingRuntimePack)' == 'true' and '%(RuntimePackLabels)' == 'Mono' and $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0'))" />
</ItemGroup>
</Target>
</Project>

0 comments on commit 238ccec

Please sign in to comment.