aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'gn/BUILD.gn')
-rw-r--r--gn/BUILD.gn7
1 files changed, 7 insertions, 0 deletions
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" ]
}