Browse Source

[Browser] Add dotnet/runtime#109289 workaround (#17507)

* Add dotnet/runtime#109289 workaround

* Add target framework version condition
release/11.2.1
Max Katz 1 year ago
parent
commit
42e396e0de
  1. 19
      src/Browser/Avalonia.Browser/build/Avalonia.Browser.targets

19
src/Browser/Avalonia.Browser/build/Avalonia.Browser.targets

@ -28,4 +28,23 @@
<NativeFileReference Include="$(HarfBuzzSharpStaticLibraryPath)/3.1.34/st/*.a" Condition="'$(WasmEnableThreads)' != 'True'" /> <NativeFileReference Include="$(HarfBuzzSharpStaticLibraryPath)/3.1.34/st/*.a" Condition="'$(WasmEnableThreads)' != 'True'" />
<NativeFileReference Include="$(HarfBuzzSharpStaticLibraryPath)/3.1.34/mt/*.a" Condition="'$(WasmEnableThreads)' == 'True'" /> <NativeFileReference Include="$(HarfBuzzSharpStaticLibraryPath)/3.1.34/mt/*.a" Condition="'$(WasmEnableThreads)' == 'True'" />
</ItemGroup> </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> </Project>

Loading…
Cancel
Save