Index: build/config/sanitizers/BUILD.gn |
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn |
index e7425461d40b6cdf5aab428f0adf66ba934dde13..643d245420ff57c47bfed1de184a2c16dda0c262 100644 |
--- a/build/config/sanitizers/BUILD.gn |
+++ b/build/config/sanitizers/BUILD.gn |
@@ -200,6 +200,9 @@ config("default_sanitizer_ldflags") { |
ldflags = [] |
if (is_asan) { |
ldflags += [ "-fsanitize=address" ] |
+ if (!is_mac) { |
achuithb
2017/01/21 01:00:40
Also not chromeos
|
+ ldflags += [ "-fsanitize-address-use-after-scope" ] |
+ } |
} |
if (is_lsan) { |
ldflags += [ "-fsanitize=leak" ] |
@@ -309,6 +312,9 @@ config("asan_flags") { |
cflags = [] |
if (is_asan) { |
cflags += [ "-fsanitize=address" ] |
+ if (!is_mac) { |
+ cflags += [ "-fsanitize-address-use-after-scope" ] |
+ } |
if (!asan_globals) { |
cflags += [ |
"-mllvm", |