diff options
Diffstat (limited to 'BUILD.gn')
-rw-r--r-- | BUILD.gn | 52 |
1 files changed, 23 insertions, 29 deletions
@@ -48,10 +48,6 @@ declare_args() { skia_compile_processors = false skia_lex = false - skia_jumper_clang = "" - skia_jumper_objdump = "" - skia_jumper_ccache = "" - skia_skqp_enable_driver_correctness_workarounds = false skia_skqp_global_error_tolerance = 0 } @@ -314,6 +310,28 @@ opts("avx") { } } +opts("hsw") { + enabled = is_x86 + sources = skia_opts.hsw_sources + if (!is_clang && is_win) { + cflags = [ "/arch:AVX2" ] + } else { + cflags = [ + "-mavx2", + "-mf16c", + "-mfma", + ] + } + + # Oddly, clang-cl doesn't recognize this as a valid flag. + # If it ever does, it'd nice to move this up with -mavx2 and co. + if (is_clang && !is_win) { + # This flag lets Clang generate FMAs when it sees a mul-then-add. It's optional, + # but nice to have, generating slightly better code for paths without explicit FMAs. + cflags += [ "-ffp-contract=fast" ] + } +} + # Any feature of Skia that requires third-party code should be optional and use this template. template("optional") { if (invoker.enabled) { @@ -775,6 +793,7 @@ component("skia") { ":fontmgr_fuchsia", ":gpu", ":heif", + ":hsw", ":jpeg", ":none", ":pdf", @@ -2101,28 +2120,3 @@ if (skia_enable_tools) { } } } - -if (skia_jumper_clang != "") { - action("regen_jumper") { - script = "src/jumper/build_stages.py" - - inputs = [ - "src/jumper/SkJumper_stages.cpp", - "src/jumper/SkJumper_stages_lowp.cpp", - ] - - # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it. - outputs = [ - "$target_out_dir/" + - rebase_path("src/jumper/SkJumper_generated.S", target_out_dir), - "$target_out_dir/" + - rebase_path("src/jumper/SkJumper_generated_win.S", target_out_dir), - ] - - args = [ - skia_jumper_clang, - skia_jumper_objdump, - skia_jumper_ccache, - ] + rebase_path(inputs) + rebase_path(outputs) - } -} |