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

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

Issue 2099003002: build tweaks for cfi Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 6 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 dddbf2fa49410578aa913c4d82e38e7c749026d6..fac7d51f682451e3493e77a8171903dd7920a9bf 100644
--- a/build/config/sanitizers/BUILD.gn
+++ b/build/config/sanitizers/BUILD.gn
@@ -157,9 +157,13 @@ config("default_sanitizer_ldflags") {
if (is_cfi && !is_nacl) {
ldflags += [
"-fsanitize=cfi-vcall",
- "-fsanitize=cfi-derived-cast",
- "-fsanitize=cfi-unrelated-cast",
]
+ if (use_cfi_cast) {
+ ldflags += [
+ "-fsanitize=cfi-derived-cast",
+ "-fsanitize=cfi-unrelated-cast",
+ ]
+ }
if (use_cfi_diag) {
ldflags += [
"-fno-sanitize-trap=cfi",
@@ -255,8 +259,14 @@ config("cfi_flags") {
rebase_path("//tools/cfi/blacklist.txt", root_build_dir)
cflags += [
"-fsanitize=cfi-vcall",
- "-fsanitize=cfi-derived-cast",
- "-fsanitize=cfi-unrelated-cast",
+ ]
+ if (use_cfi_cast) {
+ cflags += [
+ "-fsanitize=cfi-derived-cast",
+ "-fsanitize=cfi-unrelated-cast",
+ ]
+ }
+ cflags += [
"-fsanitize-blacklist=$cfi_blacklist_path",
]
« 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