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

Unified Diff: build/config/compiler/compiler.gni

Issue 1324623005: Move sanitizer and symbol flags out of BUILDCONFIG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/config/compiler/BUILD.gn ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/compiler.gni
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
new file mode 100644
index 0000000000000000000000000000000000000000..d5db930dab419abdc41ceaf4e148f5a7239c759b
--- /dev/null
+++ b/build/config/compiler/compiler.gni
@@ -0,0 +1,30 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/sanitizers/sanitizers.gni")
+
+declare_args() {
+ # How many symbols to include in the build. This affects the performance of
+ # the build since the symbols are large and dealing with them is slow.
+ # 2 means regular build with symbols.
+ # 1 means minimal symbols, usually enough for backtraces only.
+ # 0 means no symbols.
+ # -1 means auto-set according to debug/release and platform.
+ symbol_level = -1
+}
+
+# If it wasn't manually set, set to an appropriate default.
+assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level")
+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 if (is_asan || is_lsan || is_tsan || is_msan) {
+ # Sanitizers require symbols for filename suppressions to work.
+ symbol_level = 1
+ } else {
+ symbol_level = 0
+ }
+}
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698