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

Side by Side Diff: build/config/sanitizers/BUILD.gn

Issue 2843773003: Add a GN flag to allow sanitizer builds with full debugging symbols. (Closed)
Patch Set: rename flag Created 3 years, 7 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 | « no previous file | build/config/sanitizers/sanitizers.gni » ('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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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_overrides/build.gni") 5 import("//build_overrides/build.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/chromecast_build.gni") 7 import("//build/config/chromecast_build.gni")
8 import("//build/config/clang/clang.gni") 8 import("//build/config/clang/clang.gni")
9 import("//build/config/sanitizers/sanitizers.gni") 9 import("//build/config/sanitizers/sanitizers.gni")
10 import("//build/toolchain/toolchain.gni") 10 import("//build/toolchain/toolchain.gni")
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 } 271 }
272 } 272 }
273 } 273 }
274 274
275 config("common_sanitizer_flags") { 275 config("common_sanitizer_flags") {
276 cflags = [] 276 cflags = []
277 cflags_cc = [] 277 cflags_cc = []
278 278
279 # Sanitizers need line table info for stack traces. They don't need type info 279 # Sanitizers need line table info for stack traces. They don't need type info
280 # or variable info, so we can leave that out to speed up the build. 280 # or variable info, so we can leave that out to speed up the build (unless
281 # it's explicitly asked for by setting |sanitizer_keep_symbols| to true).
281 if (using_sanitizer) { 282 if (using_sanitizer) {
282 assert(is_clang, "sanitizers only supported with clang") 283 assert(is_clang, "sanitizers only supported with clang")
284 if (!sanitizer_keep_symbols) {
285 cflags += [ "-gline-tables-only" ]
286 }
287
283 cflags += [ 288 cflags += [
284 "-gline-tables-only",
285
286 # Column info in debug data confuses Visual Studio's debugger, so don't 289 # Column info in debug data confuses Visual Studio's debugger, so don't
287 # use this by default. However, clusterfuzz needs it for good attribution 290 # use this by default. However, clusterfuzz needs it for good attribution
288 # of reports to CLs, so turn it on there. 291 # of reports to CLs, so turn it on there.
289 "-gcolumn-info", 292 "-gcolumn-info",
290 ] 293 ]
291 } 294 }
292 295
293 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer, 296 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer,
294 # MemorySanitizer and non-official CFI builds. 297 # MemorySanitizer and non-official CFI builds.
295 if (using_sanitizer || (is_cfi && !is_official_build)) { 298 if (using_sanitizer || (is_cfi && !is_official_build)) {
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 # This allows to selectively disable ubsan_vptr, when needed. In particular, 588 # This allows to selectively disable ubsan_vptr, when needed. In particular,
586 # if some third_party code is required to be compiled without rtti, which 589 # if some third_party code is required to be compiled without rtti, which
587 # is a requirement for ubsan_vptr. 590 # is a requirement for ubsan_vptr.
588 config("default_sanitizer_flags_but_ubsan_vptr") { 591 config("default_sanitizer_flags_but_ubsan_vptr") {
589 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] 592 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ]
590 } 593 }
591 594
592 config("default_sanitizer_flags_but_coverage") { 595 config("default_sanitizer_flags_but_coverage") {
593 configs = all_sanitizer_configs - [ ":coverage_flags" ] 596 configs = all_sanitizer_configs - [ ":coverage_flags" ]
594 } 597 }
OLDNEW
« no previous file with comments | « no previous file | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698