Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2762)

Unified Diff: build/config/sanitizers/BUILD.gn

Issue 1374423002: Add UBsan vtpr support to GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-ubsan
Patch Set: Don't use libc++ Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698