diff --git a/native/wasm/build.cake b/native/wasm/build.cake index 91e0082a2f..cfa51de6de 100644 --- a/native/wasm/build.cake +++ b/native/wasm/build.cake @@ -63,7 +63,7 @@ Task("libSkiaSharp") $" '-s', 'WARN_UNALIGNED=1' " + // '-s', 'USE_WEBGL2=1' (experimental) $"] " + // SIMD support is based on https://github.com/google/skia/blob/1f193df9b393d50da39570dab77a0bb5d28ec8ef/modules/canvaskit/compile.sh#L57 - $"extra_cflags_cc=[ '-frtti' { (hasSimdEnabled ? ", '-msimd128'" : "") { (hasThreadingEnabled ? ", '-pthread'" : "") } } ] " + + $"extra_cflags_cc=[ '-frtti' { (hasSimdEnabled ? ", '-msimd128'" : "") } { (hasThreadingEnabled ? ", '-pthread'" : "") } ] " + COMPILERS + ADDITIONAL_GN_ARGS); @@ -107,12 +107,15 @@ Task("libHarfBuzzSharp") .WithCriteria(IsRunningOnLinux()) .Does(() => { + bool hasSimdEnabled = EMSCRIPTEN_FEATURES.Contains("simd"); + bool hasThreadingEnabled = EMSCRIPTEN_FEATURES.Contains("mt"); + GnNinja($"wasm", "HarfBuzzSharp", $"target_os='linux' " + $"target_cpu='wasm' " + $"is_static_skiasharp=true " + $"visibility_hidden=false " + - $"extra_cflags_cc=[ '-frtti' { (hasSimdEnabled ? ", '-msimd128'" : "") { (hasThreadingEnabled ? ", '-pthread'" : "") } } ] " + + $"extra_cflags_cc=[ '-frtti' { (hasSimdEnabled ? ", '-msimd128'" : "") } { (hasThreadingEnabled ? ", '-pthread'" : "") } ] " + COMPILERS + ADDITIONAL_GN_ARGS);