Skip to content

Commit

Permalink
[Browser] Add dotnet/runtime#109289 workaround (#17507)
Browse files Browse the repository at this point in the history
* Add dotnet/runtime#109289 workaround

* Add target framework version condition
  • Loading branch information
maxkatz6 committed Nov 14, 2024
1 parent 9c5e639 commit 42e396e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Browser/Avalonia.Browser/build/Avalonia.Browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,23 @@
<NativeFileReference Include="$(HarfBuzzSharpStaticLibraryPath)/3.1.34/st/*.a" Condition="'$(WasmEnableThreads)' != 'True'" />
<NativeFileReference Include="$(HarfBuzzSharpStaticLibraryPath)/3.1.34/mt/*.a" Condition="'$(WasmEnableThreads)' == 'True'" />
</ItemGroup>

<!-- https://github.com/dotnet/runtime/issues/109289 -->
<Target Name="Issue109289_Workaround"
Condition="'$(DisableIssue109289Workaround)' != 'true' AND $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '9.0'))"
AfterTargets="_BrowserWasmWriteRspForLinking">
<ItemGroup>
<_WasmLinkStepArgs Remove="@(_EmccLinkStepArgs)" />
<_EmccLinkStepArgs Remove="&quot;%(_WasmNativeFileForLinking.Identity)&quot;" />
<_WasmLinkDependencies Remove="@(_WasmNativeFileForLinking)" />

<_SkiaSharpToReorder Include="@(_WasmNativeFileForLinking)" Condition="$([System.String]::Copy('%(FullPath)').Contains('SkiaSharp'))" />
<_WasmNativeFileForLinking Remove="@(_SkiaSharpToReorder)" />
<_WasmNativeFileForLinking Include="@(_SkiaSharpToReorder)" />

<_EmccLinkStepArgs Include="&quot;%(_WasmNativeFileForLinking.Identity)&quot;" />
<_WasmLinkDependencies Include="@(_WasmNativeFileForLinking)" />
<_WasmLinkStepArgs Include="@(_EmccLinkStepArgs)" />
</ItemGroup>
</Target>
</Project>

0 comments on commit 42e396e

Please sign in to comment.