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

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

Issue 2920963002: GN: Add an explicit gn arg for recovery in CFI (Closed)
Patch Set: typo Created 3 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 | « no previous file | 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 67d9568c22cb7d380c0fc071f794f294e1c455e5..637fc881174f37fbcf016d8e314c1f3315ba55fb 100644
--- a/build/config/sanitizers/BUILD.gn
+++ b/build/config/sanitizers/BUILD.gn
@@ -218,10 +218,10 @@ config("default_sanitizer_ldflags") {
]
}
if (use_cfi_diag) {
- ldflags += [
- "-fno-sanitize-trap=cfi",
- "-fsanitize-recover=cfi",
- ]
+ ldflags += [ "-fno-sanitize-trap=cfi" ]
+ if (use_cfi_recover) {
+ ldflags += [ "-fsanitize-recover=cfi" ]
+ }
}
}
} else if (is_win && is_asan) {
@@ -382,12 +382,14 @@ config("cfi_flags") {
if (use_cfi_diag) {
cflags += [
"-fno-sanitize-trap=cfi",
- "-fsanitize-recover=cfi",
"-fno-inline-functions",
"-fno-inline",
"-fno-omit-frame-pointer",
"-O1",
]
+ if (use_cfi_recover) {
+ cflags += [ "-fsanitize-recover=cfi" ]
+ }
} else {
defines = [ "CFI_ENFORCEMENT" ]
}
« no previous file with comments | « no previous file | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698