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

Side by Side Diff: build/config/compiler/compiler.gni

Issue 1379503002: Add Undefined Behaviour sanitizer support to GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/config/sanitizers/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/sanitizers/sanitizers.gni") 5 import("//build/config/sanitizers/sanitizers.gni")
6 6
7 declare_args() { 7 declare_args() {
8 # How many symbols to include in the build. This affects the performance of 8 # How many symbols to include in the build. This affects the performance of
9 # the build since the symbols are large and dealing with them is slow. 9 # the build since the symbols are large and dealing with them is slow.
10 # 2 means regular build with symbols. 10 # 2 means regular build with symbols.
11 # 1 means minimal symbols, usually enough for backtraces only. 11 # 1 means minimal symbols, usually enough for backtraces only.
12 # 0 means no symbols. 12 # 0 means no symbols.
13 # -1 means auto-set according to debug/release and platform. 13 # -1 means auto-set according to debug/release and platform.
14 symbol_level = -1 14 symbol_level = -1
15 } 15 }
16 16
17 # If it wasn't manually set, set to an appropriate default. 17 # If it wasn't manually set, set to an appropriate default.
18 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level") 18 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level")
19 if (symbol_level == -1) { 19 if (symbol_level == -1) {
20 # Linux is slowed by having symbols as part of the target binary, whereas 20 # Linux is slowed by having symbols as part of the target binary, whereas
21 # Mac and Windows have them separate, so in Release Linux, default them off. 21 # Mac and Windows have them separate, so in Release Linux, default them off.
22 if (is_debug || !is_linux) { 22 if (is_debug || !is_linux) {
23 symbol_level = 2 23 symbol_level = 2
24 } else if (is_asan || is_lsan || is_tsan || is_msan) { 24 } else if (using_sanitizer) {
25 # Sanitizers require symbols for filename suppressions to work. 25 # Sanitizers require symbols for filename suppressions to work.
26 symbol_level = 1 26 symbol_level = 1
27 } else { 27 } else {
28 symbol_level = 0 28 symbol_level = 0
29 } 29 }
30 } 30 }
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/config/sanitizers/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698