Chromium Code Reviews| Index: build/config/sanitizers/BUILD.gn |
| diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn |
| index e7e36b5db84422529b68fcf56e244ea317fb9490..7e3d11a63ce755c31993f1b63989f75d1e45fe3d 100644 |
| --- a/build/config/sanitizers/BUILD.gn |
| +++ b/build/config/sanitizers/BUILD.gn |
| @@ -68,6 +68,18 @@ source_set("options_sources") { |
| } |
| } |
| +config("ubsan_vptr_flags") { |
| + if (is_ubsan_vptr) { |
|
Dirk Pranke
2016/04/26 01:00:32
maybe add a comment here about why this isn't just
krasin
2016/04/26 03:15:09
Done.
|
| + ubsan_vptr_blacklist_path = |
| + rebase_path("//tools/ubsan/vptr_blacklist.txt", root_build_dir) |
| + cflags = [ |
| + "-fsanitize=vptr", |
| + "-fsanitize-blacklist=$ubsan_vptr_blacklist_path", |
| + ] |
| + ldflags = [ "-fsanitize=vptr" ] |
| + } |
| +} |
| + |
| # Applies linker flags necessary when either :deps or :default_sanitizer_flags |
| # are used. |
| config("default_sanitizer_ldflags") { |
| @@ -93,9 +105,6 @@ config("default_sanitizer_ldflags") { |
| if (is_ubsan || is_ubsan_security) { |
| ldflags += [ "-fsanitize=undefined" ] |
| } |
| - if (is_ubsan_vptr) { |
| - ldflags += [ "-fsanitize=vptr" ] |
| - } |
| if (is_cfi && !is_nacl) { |
| ldflags += [ |
| @@ -245,14 +254,6 @@ config("default_sanitizer_flags") { |
| ] |
| } |
| } |
| - 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_ubsan_security) { |
| ubsan_blacklist_path = |
| rebase_path("//tools/ubsan/blacklist.txt", root_build_dir) |