Skip to content

Commit

Permalink
Merge pull request #845 from unoplatform/dev/eb/illink
Browse files Browse the repository at this point in the history
fix: Align linker version with ILLinkPack resolution
  • Loading branch information
jeromelaban authored May 14, 2024
2 parents 0a56349 + 5caab46 commit fa8ff9d
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 fa8ff9d

Please sign in to comment.