From ebf648e57afa0484b4665b2c945331e1af0dfb83 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Thu, 21 Sep 2017 13:45:16 -0400 Subject: [WASM] Add POC compile bot for WebAssembly Fix core.gni to use not use Assembler for none cpu. Right now, there are no outputs because we aren't compiling dm or nanobench. However, this still compiles the skia library and creates two executables, so it's a good canary for a real WASM build. Additional note: the two executables in question don't draw anything to the screen via GL, which is still not possible with Skia+WASM. Bug: skia: Change-Id: I0d767467e94e40d01070e34223dd90e96f1c96f2 Reviewed-on: https://skia-review.googlesource.com/49540 Commit-Queue: Kevin Lubick Reviewed-by: Mike Klein Reviewed-by: Eric Boren --- gn/BUILD.gn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gn/BUILD.gn') diff --git a/gn/BUILD.gn b/gn/BUILD.gn index b91c8770e7..5d17cade50 100644 --- a/gn/BUILD.gn +++ b/gn/BUILD.gn @@ -438,6 +438,13 @@ config("release") { } else { ldflags = [ "-Wl,--gc-sections" ] } + if (target_cpu == "wasm") { + # The compiler asks us to add an optimization flag to both cflags + # and ldflags to cut down on the local variables, + # for performance reasons. + # The "linking" step is the conversion to javascript. + ldflags += [ "-O3" ] + } } defines = [ "NDEBUG" ] } -- cgit v1.2.3