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

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

Issue 2843773003: Add a GN flag to allow sanitizer builds with full debugging symbols. (Closed)
Patch Set: rename flag Created 3 years, 8 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/sanitizers/BUILD.gn ('k') | no next file » | 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/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/toolchain/toolchain.gni") 6 import("//build/toolchain/toolchain.gni")
7 7
8 declare_args() { 8 declare_args() {
9 # Compile for Address Sanitizer to find memory bugs. 9 # Compile for Address Sanitizer to find memory bugs.
10 is_asan = false 10 is_asan = false
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 # Not for client use. 90 # Not for client use.
91 disable_libfuzzer = false 91 disable_libfuzzer = false
92 92
93 # Value for -fsanitize-coverage flag. Setting this causes 93 # Value for -fsanitize-coverage flag. Setting this causes
94 # use_sanitizer_coverage to be enabled. 94 # use_sanitizer_coverage to be enabled.
95 # Default value when unset and use_afl=true: 95 # Default value when unset and use_afl=true:
96 # trace-pc 96 # trace-pc
97 # Default value when unset and use_sanitizer_coverage=true: 97 # Default value when unset and use_sanitizer_coverage=true:
98 # edge,indirect-calls,8bit-counters 98 # edge,indirect-calls,8bit-counters
99 sanitizer_coverage_flags = "" 99 sanitizer_coverage_flags = ""
100
101 # Keep symbol level when building with sanitizers. When sanitizers are
102 # enabled, the default is to compile with the minimum debug info level
103 # necessary, overriding any other symbol level arguments that may be set.
104 # Setting this to true prevents this.
105 sanitizer_keep_symbols = false
100 } 106 }
101 107
102 # Disable sanitizers for non-default toolchains. 108 # Disable sanitizers for non-default toolchains.
103 if (current_toolchain != default_toolchain) { 109 if (current_toolchain != default_toolchain) {
104 is_asan = false 110 is_asan = false
105 is_cfi = false 111 is_cfi = false
106 is_lsan = false 112 is_lsan = false
107 is_msan = false 113 is_msan = false
108 is_syzyasan = false 114 is_syzyasan = false
109 is_tsan = false 115 is_tsan = false
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr), 194 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr),
189 "Sanitizers should generally be used in release (set is_debug=false).") 195 "Sanitizers should generally be used in release (set is_debug=false).")
190 196
191 assert(!is_msan || (is_linux && current_cpu == "x64"), 197 assert(!is_msan || (is_linux && current_cpu == "x64"),
192 "MSan currently only works on 64-bit Linux and ChromeOS builds.") 198 "MSan currently only works on 64-bit Linux and ChromeOS builds.")
193 199
194 # ASAN build on Windows is not working in debug mode. Intercepting memory 200 # ASAN build on Windows is not working in debug mode. Intercepting memory
195 # allocation functions is hard on Windows and not yet implemented in LLVM. 201 # allocation functions is hard on Windows and not yet implemented in LLVM.
196 assert(!is_win || !is_debug || !is_asan, 202 assert(!is_win || !is_debug || !is_asan,
197 "ASan on Windows doesn't work in debug (set is_debug=false).") 203 "ASan on Windows doesn't work in debug (set is_debug=false).")
OLDNEW
« no previous file with comments | « build/config/sanitizers/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698