Index: build/config/sanitizers/BUILD.gn |
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn |
index 4394014616cd5e22a45d7ef91ecf968e7f535eee..0a037e1dfe4e78e37bf576ca6888b7d6aa635cf4 100644 |
--- a/build/config/sanitizers/BUILD.gn |
+++ b/build/config/sanitizers/BUILD.gn |
@@ -13,7 +13,7 @@ group("deps") { |
use_custom_libcxx = true |
} |
- if (is_asan || is_lsan || is_tsan || is_msan || is_ubsan) { |
+ if (using_sanitizer) { |
public_configs = [ ":sanitizer_options_link_helper" ] |
deps = [ |
":options_sources", |
@@ -45,6 +45,9 @@ config("sanitizer_options_link_helper") { |
if (is_ubsan) { |
ldflags += [ "-fsanitize=undefined" ] |
} |
+ if (is_ubsan_vptr) { |
+ ldflags += [ "-fsanitize=vptr" ] |
+ } |
} |
source_set("options_sources") { |
@@ -158,6 +161,14 @@ config("default_sanitizer_flags") { |
"-pbqp-coalescing", |
] |
} |
+ if (is_ubsan_vptr) { |
+ ubsan_vptr_blacklist_path = |
+ rebase_path("//tools/ubsan/vptr_blacklist.txt", root_build_dir) |
+ cflags += [ |
+ "-fsanitize=vptr", |
+ "-fsanitize-blacklist=$ubsan_vptr_blacklist_path", |
+ ] |
+ } |
if (is_cfi && !is_nacl) { |
cfi_blacklist_path = |
rebase_path("//tools/cfi/blacklist.txt", root_build_dir) |