Skip to content

Commit

Permalink
chore: Adjust flags for C compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Oct 12, 2022
1 parent cfc5073 commit cba3d79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions native/wasm/build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Task("libSkiaSharp")
$" '-DSKIA_C_DLL', '-DXML_POOR_ENTROPY', " +
$" {(!hasSimdEnabled ? "'-DSKNX_NO_SIMD', " : "")} '-DSK_DISABLE_AAA', '-DGR_GL_CHECK_ALLOC_WITH_GET_ERROR=0', " +
$" '-s', 'WARN_UNALIGNED=1' " + // '-s', 'USE_WEBGL2=1' (experimental)
$" { (hasSimdEnabled ? ", '-msimd128'," : "") } " +
$" { (hasSimdEnabled ? ", '-pthread'," : "") } " +
$"] " +
// 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'" : "") } ] " +
Expand Down Expand Up @@ -115,6 +117,7 @@ Task("libHarfBuzzSharp")
$"target_cpu='wasm' " +
$"is_static_skiasharp=true " +
$"visibility_hidden=false " +
$"extra_cflags=[ { (hasSimdEnabled ? "'-msimd128', " : "") } { (hasThreadingEnabled ? "'-pthread'" : "") } ] " +
$"extra_cflags_cc=[ '-frtti' { (hasSimdEnabled ? ", '-msimd128'" : "") } { (hasThreadingEnabled ? ", '-pthread'" : "") } ] " +
COMPILERS +
ADDITIONAL_GN_ARGS);
Expand Down

0 comments on commit cba3d79

Please sign in to comment.