Index: build/config/sanitizers/BUILD.gn |
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn |
index 637fc881174f37fbcf016d8e314c1f3315ba55fb..03890b992cf6b4cc2cb28c2969ee0c47c84a5590 100644 |
--- a/build/config/sanitizers/BUILD.gn |
+++ b/build/config/sanitizers/BUILD.gn |
@@ -259,6 +259,8 @@ config("common_sanitizer_flags") { |
# it's explicitly asked for by setting |sanitizer_keep_symbols| to true). |
if (using_sanitizer) { |
assert(is_clang, "sanitizers only supported with clang") |
+ assert(!is_official_build, "sanitizers not supported in official builds") |
+ |
if (!sanitizer_keep_symbols) { |
cflags += [ "-gline-tables-only" ] |
} |
@@ -269,11 +271,8 @@ config("common_sanitizer_flags") { |
# of reports to CLs, so turn it on there. |
"-gcolumn-info", |
] |
- } |
- # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer, |
- # MemorySanitizer and non-official CFI builds. |
- if (using_sanitizer || (is_cfi && !is_official_build)) { |
+ # Disable frame pointer elimination for better stack traces. |
if (is_posix) { |
cflags += [ "-fno-omit-frame-pointer" ] |
} else { |