From ea8cfa929fcd90975039cb037e7547bf75d7aec9 Mon Sep 17 00:00:00 2001 From: brettw Date: Fri, 11 Sep 2015 11:28:15 -0700 Subject: [PATCH] Optionally use new GN optimization config. The GN default optimization flag is changing from being specific to the debug/release status of the build to always being "default_optimization" so it's easier to override without being conditional on the exact setup in BUILDCONFIG.gn. See https://codereview.chromium.org/1324623005/ Since V8 is DEPS-ed in, it will need to support both modes to allow a landing. This patch uses a temporary transitional flag I added to BUILDCONFIG to indicate which variant should be used. After the patch is landed, we can remove the new conditions and just remove default_optimization. Review URL: https://codereview.chromium.org/1333963002 Cr-Commit-Position: refs/heads/master@{#30703} --- BUILD.gn | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index d6341f7..23108b9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1534,7 +1534,11 @@ source_set("v8_base") { ] if (!is_debug) { - configs -= [ "//build/config/compiler:optimize" ] + if (using_new_optimization_config) { + configs -= [ "//build/config/compiler:default_optimization" ] + } else { + configs -= [ "//build/config/compiler:optimize" ] + } configs += [ "//build/config/compiler:optimize_max" ] } @@ -1633,7 +1637,11 @@ source_set("v8_libbase") { ] if (!is_debug) { - configs -= [ "//build/config/compiler:optimize" ] + if (using_new_optimization_config) { + configs -= [ "//build/config/compiler:default_optimization" ] + } else { + configs -= [ "//build/config/compiler:optimize" ] + } configs += [ "//build/config/compiler:optimize_max" ] } @@ -1700,7 +1708,11 @@ source_set("v8_libplatform") { ] if (!is_debug) { - configs -= [ "//build/config/compiler:optimize" ] + if (using_new_optimization_config) { + configs -= [ "//build/config/compiler:default_optimization" ] + } else { + configs -= [ "//build/config/compiler:optimize" ] + } configs += [ "//build/config/compiler:optimize_max" ] } -- 2.7.4