Index: build/config/sanitizers/BUILD.gn |
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn |
index f034331039269a40e5de0f0ee1be6e992bdd1874..78166cbde89308d996554c48f77a64ab8be9244d 100644 |
--- a/build/config/sanitizers/BUILD.gn |
+++ b/build/config/sanitizers/BUILD.gn |
@@ -277,12 +277,15 @@ config("common_sanitizer_flags") { |
cflags_cc = [] |
# Sanitizers need line table info for stack traces. They don't need type info |
- # or variable info, so we can leave that out to speed up the build. |
+ # or variable info, so we can leave that out to speed up the build (unless |
+ # it's explicitly asked for by setting |sanitizer_keep_symbols| to true). |
if (using_sanitizer) { |
assert(is_clang, "sanitizers only supported with clang") |
- cflags += [ |
- "-gline-tables-only", |
+ if (!sanitizer_keep_symbols) { |
+ cflags += [ "-gline-tables-only" ] |
+ } |
+ cflags += [ |
# Column info in debug data confuses Visual Studio's debugger, so don't |
# use this by default. However, clusterfuzz needs it for good attribution |
# of reports to CLs, so turn it on there. |