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

Unified Diff: build/config/BUILDCONFIG.gn

Issue 1326053003: port cfi to gn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable CFI when targeting nacl Created 5 years, 3 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/compiler/BUILD.gn » ('j') | build/config/compiler/BUILD.gn » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILDCONFIG.gn
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 6bc28eccf710cf6e6b2f40609d1a79b7ef67837b..3d7d7961ee3180ce843c36fdc3364b1f6d0488a1 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -145,6 +145,13 @@ declare_args() {
# Compile for Thread Sanitizer to find threading bugs.
is_tsan = false
+ # Compile with Control Flow Integrity to protect virtual calls and casts.
+ # See http://clang.llvm.org/docs/ControlFlowIntegrity.html
+ is_cfi = false
brettw 2015/09/03 04:41:20 I was thinking of removing the *san flags from her
pcc1 2015/09/04 21:56:59 Done.
+
+ # Whether Control Flow Integrity prints diagnostics instead of crashing.
+ use_cfi_diag = false
+
if (current_os == "chromeos") {
# Allows the target toolchain to be injected as arguments. This is needed
# to support the CrOS build system which supports per-build-configuration
@@ -438,7 +445,7 @@ if (symbol_level == -1) {
# Mac and Windows have them separate, so in Release Linux, default them off.
if (is_debug || !is_linux) {
symbol_level = 2
- } else if (is_asan || is_lsan || is_tsan || is_msan) {
+ } else if (is_asan || is_lsan || is_tsan || is_msan || is_cfi) {
# Sanitizers require symbols for filename suppressions to work.
symbol_level = 1
} else {
« no previous file with comments | « no previous file | build/config/compiler/BUILD.gn » ('j') | build/config/compiler/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698