From 59af8b77145b8ff33a610128d339f02f950d3e7a Mon Sep 17 00:00:00 2001 From: ehmaldonado Date: Mon, 5 Sep 2016 02:48:54 -0700 Subject: [PATCH] GN Templates: Use the optimize_max compiler config. Add "//build/config/compiler:optimize_max" to rtc_add_configs and "//build/config/compiler:default_optimization" to rtc_remove_configs. This is the default optimization in GYP, and might help explain a 82.5% regression in webrtc_perf_tests at 13946:13946 BUG=chromium:641966 NOTRY=True Review-Url: https://codereview.webrtc.org/2307283002 Cr-Commit-Position: refs/heads/master@{#14067} --- webrtc/BUILD.gn | 5 ----- webrtc/build/webrtc.gni | 5 +++++ webrtc/modules/audio_coding/BUILD.gn | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index aaa1d72f96..b1929a51e9 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -770,11 +770,6 @@ if (rtc_include_tests) { configs += [ ":rtc_unittests_config" ] public_configs = [ ":common_inherited_config" ] - if (!is_debug) { - suppressed_configs += [ "//build/config/compiler:default_optimization" ] - configs += [ "//build/config/compiler:optimize_max" ] - } - sources = [ "call/call_perf_tests.cc", "call/rampup_tests.cc", diff --git a/webrtc/build/webrtc.gni b/webrtc/build/webrtc.gni index 60546ad34f..c2f48a990c 100644 --- a/webrtc/build/webrtc.gni +++ b/webrtc/build/webrtc.gni @@ -173,6 +173,11 @@ rtc_common_config = webrtc_root + ":common_config" rtc_remove_configs = [] rtc_add_configs = [ rtc_common_config ] +if (!is_debug) { + rtc_remove_configs += [ "//build/config/compiler:default_optimization" ] + rtc_add_configs += [ "//build/config/compiler:optimize_max" ] +} + set_defaults("rtc_test") { configs = rtc_add_configs suppressed_configs = [] diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn index ce35737dcc..6c9be5f11d 100644 --- a/webrtc/modules/audio_coding/BUILD.gn +++ b/webrtc/modules/audio_coding/BUILD.gn @@ -1104,11 +1104,6 @@ if (rtc_include_tests) { public_configs = [ "../..:common_inherited_config" ] - if (!is_debug) { - suppressed_configs += [ "//build/config/compiler:default_optimization" ] - configs += [ "//build/config/compiler:optimize_max" ] - } - if (is_clang) { # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163). suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]