From 2273b1ef8b46f3e8b048b93be0791dc47f86c197 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 06:53:45 +0800 Subject: [PATCH] Move the Blazor workaround into WASM (#3082) (#3087) The workaround needed for WASM is not really Blazor specific and if the project is not using the Blazor views, the fix will not be applied to the build. (cherry picked from commit 32fbf8deb26b9f1d949d5a995a360260b1e98241) Co-authored-by: Matthew Leibowitz --- .../buildTransitive/HarfBuzzSharp.targets | 18 ++++++++++++++++++ binding/IncludeNativeAssets.SkiaSharp.targets | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/binding/HarfBuzzSharp.NativeAssets.WebAssembly/buildTransitive/HarfBuzzSharp.targets b/binding/HarfBuzzSharp.NativeAssets.WebAssembly/buildTransitive/HarfBuzzSharp.targets index 7198786ae6..6e2fdd3bb6 100644 --- a/binding/HarfBuzzSharp.NativeAssets.WebAssembly/buildTransitive/HarfBuzzSharp.targets +++ b/binding/HarfBuzzSharp.NativeAssets.WebAssembly/buildTransitive/HarfBuzzSharp.targets @@ -31,4 +31,22 @@ + + + + <_WasmLinkStepArgs Remove="@(_EmccLinkStepArgs)" /> + <_EmccLinkStepArgs Remove=""%(_WasmNativeFileForLinking.Identity)"" /> + <_WasmLinkDependencies Remove="@(_WasmNativeFileForLinking)" /> + + <_SkiaSharpToReorder Include="@(_WasmNativeFileForLinking)" Condition="$([System.String]::Copy('%(FullPath)').Contains('libSkiaSharp.a'))" /> + <_WasmNativeFileForLinking Remove="@(_SkiaSharpToReorder)" /> + <_WasmNativeFileForLinking Include="@(_SkiaSharpToReorder)" /> + + <_EmccLinkStepArgs Include=""%(_WasmNativeFileForLinking.Identity)"" /> + <_WasmLinkDependencies Include="@(_WasmNativeFileForLinking)" /> + <_WasmLinkStepArgs Include="@(_EmccLinkStepArgs)" /> + + + \ No newline at end of file diff --git a/binding/IncludeNativeAssets.SkiaSharp.targets b/binding/IncludeNativeAssets.SkiaSharp.targets index 4596f8942d..ac82a653ea 100644 --- a/binding/IncludeNativeAssets.SkiaSharp.targets +++ b/binding/IncludeNativeAssets.SkiaSharp.targets @@ -79,7 +79,24 @@ - + + + + <_WasmLinkStepArgs Remove="@(_EmccLinkStepArgs)" /> + <_EmccLinkStepArgs Remove=""%(_WasmNativeFileForLinking.Identity)"" /> + <_WasmLinkDependencies Remove="@(_WasmNativeFileForLinking)" /> + + <_SkiaSharpToReorder Include="@(_WasmNativeFileForLinking)" Condition="$([System.String]::Copy('%(FullPath)').Contains('libSkiaSharp.a'))" /> + <_WasmNativeFileForLinking Remove="@(_SkiaSharpToReorder)" /> + <_WasmNativeFileForLinking Include="@(_SkiaSharpToReorder)" /> + + <_EmccLinkStepArgs Include=""%(_WasmNativeFileForLinking.Identity)"" /> + <_WasmLinkDependencies Include="@(_WasmNativeFileForLinking)" /> + <_WasmLinkStepArgs Include="@(_EmccLinkStepArgs)" /> + + + \ No newline at end of file