Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 255 } | 255 } |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 | 259 |
| 260 config("common_sanitizer_flags") { | 260 config("common_sanitizer_flags") { |
| 261 cflags = [] | 261 cflags = [] |
| 262 cflags_cc = [] | 262 cflags_cc = [] |
| 263 | 263 |
| 264 # Sanitizers need line table info for stack traces. They don't need type info | 264 # Sanitizers need line table info for stack traces. They don't need type info |
| 265 # or variable info, so we can leave that out to speed up the build. | 265 # or variable info, so we can leave that out to speed up the build, unless we |
| 266 # are building with full debug symbols. | |
|
Nico
2016/12/06 14:34:12
this should never happen: https://cs.chromium.org/
mstensho (USE GERRIT)
2016/12/06 16:36:53
I needed it today. I had to debug a use-after free
Nico
2016/12/06 16:47:44
So I guess you disabled that assert in the other f
| |
| 266 if (using_sanitizer) { | 267 if (using_sanitizer) { |
| 267 assert(is_clang, "sanitizers only supported with clang") | 268 assert(is_clang, "sanitizers only supported with clang") |
| 268 cflags += [ | 269 if (!is_debug) { |
| 269 "-gline-tables-only", | 270 cflags += [ "-gline-tables-only" ] |
| 271 } | |
| 270 | 272 |
| 271 # Column info in debug data confuses Visual Studio's debugger, so don't | 273 # Column info in debug data confuses Visual Studio's debugger, so don't |
| 272 # use this by default. However, clusterfuzz needs it for good attribution | 274 # use this by default. However, clusterfuzz needs it for good attribution |
| 273 # of reports to CLs, so turn it on there. | 275 # of reports to CLs, so turn it on there. |
| 274 "-gcolumn-info", | 276 cflags += [ "-gcolumn-info" ] |
| 275 ] | |
| 276 } | 277 } |
| 277 | 278 |
| 278 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer, | 279 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer, |
| 279 # MemorySanitizer and non-official CFI builds. | 280 # MemorySanitizer and non-official CFI builds. |
| 280 if (using_sanitizer || (is_cfi && !is_official_build)) { | 281 if (using_sanitizer || (is_cfi && !is_official_build)) { |
| 281 if (is_posix) { | 282 if (is_posix) { |
| 282 cflags += [ "-fno-omit-frame-pointer" ] | 283 cflags += [ "-fno-omit-frame-pointer" ] |
| 283 } else { | 284 } else { |
| 284 cflags += [ "/Oy-" ] | 285 cflags += [ "/Oy-" ] |
| 285 } | 286 } |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 539 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 540 # This allows to selectively disable ubsan_vptr, when needed. In particular, |
| 540 # if some third_party code is required to be compiled without rtti, which | 541 # if some third_party code is required to be compiled without rtti, which |
| 541 # is a requirement for ubsan_vptr. | 542 # is a requirement for ubsan_vptr. |
| 542 config("default_sanitizer_flags_but_ubsan_vptr") { | 543 config("default_sanitizer_flags_but_ubsan_vptr") { |
| 543 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 544 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
| 544 } | 545 } |
| 545 | 546 |
| 546 config("default_sanitizer_flags_but_coverage") { | 547 config("default_sanitizer_flags_but_coverage") { |
| 547 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 548 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
| 548 } | 549 } |
| OLD | NEW |