Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2910)

Unified Diff: build/config/BUILDCONFIG.gn

Issue 562383002: gn: various flag matching for 'base' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: default off only for linux Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/common.gypi ('k') | build/config/compiler/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILDCONFIG.gn
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index b01924565cb50e4d9c9bdde4f608c99295ec7824..633283dfd708a2d283451f914990f20447d9d3d7 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -22,7 +22,8 @@ declare_args() {
# 2 means regular build with symbols.
# 1 means minimal symbols, usually enough for backtraces only.
# 0 means no symbols.
- symbol_level = 2
+ # -1 means auto-set (off in release, regular in debug).
+ symbol_level = -1
# Component build.
is_component_build = false
@@ -354,6 +355,17 @@ if (is_debug) {
}
_native_compiler_configs += [ _default_optimization_config ]
+# If it wasn't manually set, set to an appropriate default.
+if (symbol_level == -1) {
+ # Linux is slowed by having symbols as part of the target binary, whereas
+ # Mac and Windows have them separate, so in Release Linux, default them off.
+ if (is_debug || !is_linux) {
+ symbol_level = 2
+ } else {
+ symbol_level = 0
+ }
+}
+
# Symbol setup.
if (symbol_level == 2) {
_default_symbols_config = "//build/config/compiler:symbols"
« no previous file with comments | « build/common.gypi ('k') | build/config/compiler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698