Skip to content

Commit

Permalink
Merge pull request #859 from unoplatform/mergify/bp/release/stable/8.…
Browse files Browse the repository at this point in the history
…0/pr-845

fix: Align linker version with ILLinkPack resolution (backport #845)
  • Loading branch information
jeromelaban authored Jun 12, 2024
2 parents 81a9611 + fae8758 commit b09926f
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions src/Uno.Wasm.Bootstrap/build/Uno.Wasm.Bootstrap.targets
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,28 @@
<_WasmBootstrapOriginalPublishDir>$(PublishDir)</_WasmBootstrapOriginalPublishDir>
</PropertyGroup>

<Choose>
<When Condition="
'$(WasmShellLinkerPath)'==''
and '$(TargetFrameworkIdentifier)'=='.NETCoreApp'
and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '5.0'))
and '$(ILLinkTasksAssembly)'!=''">

<Choose>
<When Condition="$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '8.0'))">
<PropertyGroup>
<WasmShellLinkerPath>$([System.IO.Path]::GetDirectoryName($(ILLinkTasksAssembly)))\..\net$(TargetFrameworkVersion.Substring(1))</WasmShellLinkerPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<WasmShellLinkerPath>$([System.IO.Path]::GetDirectoryName($(ILLinkTasksAssembly)))\..\net7.0</WasmShellLinkerPath>
</PropertyGroup>
</Otherwise>
</Choose>
</When>
</Choose>

<!--
============================================================
WasmBootstrapAdjustFrameworkReference
Expand Down Expand Up @@ -176,15 +198,6 @@

<_WasmShellToolSuffix Condition="'$(_WasmShellIsNetCore)'!='true'">net462</_WasmShellToolSuffix>
<_WasmShellToolSuffix Condition="'$(_WasmShellIsNetCore)'=='true'">net5.0</_WasmShellToolSuffix>

<WasmShellLinkerPath
Condition="
'$(WasmShellLinkerPath)'==''
and '$(TargetFrameworkIdentifier)'=='.NETCoreApp'
and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0'))
and '$(ILLinkTasksAssembly)'!=''"
>$([System.IO.Path]::GetDirectoryName($(ILLinkTasksAssembly)))\..\net$(BundledNETCoreAppTargetFrameworkVersion)</WasmShellLinkerPath>

</PropertyGroup>

<UnoInstallSDKTask_v0
Expand Down

0 comments on commit b09926f

Please sign in to comment.