From a7e4653c22ac39877eb75d6dd69d6f41af89a4a9 Mon Sep 17 00:00:00 2001 From: Brad Kotsopoulos Date: Mon, 6 Dec 2021 13:20:14 -0500 Subject: [PATCH] Canonical optimization levels in bazel toolchain (#940) --- bazel/emscripten_toolchain/crosstool.bzl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bazel/emscripten_toolchain/crosstool.bzl b/bazel/emscripten_toolchain/crosstool.bzl index 069ea70..b4883ea 100644 --- a/bazel/emscripten_toolchain/crosstool.bzl +++ b/bazel/emscripten_toolchain/crosstool.bzl @@ -572,9 +572,10 @@ def _impl(ctx): flag_set( actions = all_compile_actions + all_link_actions, - flags = ["-O3"], + flags = ["-O2"], features = ["opt"], ), + # Users can override opt-level with semantic names... flag_set( actions = all_compile_actions + @@ -598,7 +599,7 @@ def _impl(ctx): flag_set( actions = all_compile_actions + all_link_actions, - flags = ["-O2"], + flags = ["-O0"], features = ["fastbuild"], ),