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

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

Issue 2412983006: [Windows MSVC CFG] Add support for CFG, and enable on chrome.exe & chrome_elf.dll. (Closed)
Patch Set: Code review fixes, part 1. Created 4 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 | « no previous file | chrome/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/win/BUILD.gn
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
index 9b6ac7423f2b9d4d12bdea8302a200507d706e6e..13f52847c71a7f7f21a45edd1ecd3623aae4fbf1 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -264,6 +264,17 @@ config("common_linker_setup") {
}
}
+# Control Flow Guard (CFG)
+# https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065(v=vs.85).aspx
scottmg 2016/10/13 22:21:57 even nittier; remove the (v=vs8.5) part to make it
penny 2016/10/13 23:10:21 Good one.
+config("win_msvc_cfg") {
+ # /DYNAMICBASE (ASLR) is turned off in debug builds,
scottmg 2016/10/13 22:21:57 nit; rewrap this comment.
penny 2016/10/13 23:10:21 Done.
+ # therefore CFG can’t be turned on either.
+ if (!is_clang && !is_debug) {
+ cflags = [ "/guard:cf" ]
+ ldflags = [ "/guard:cf" ]
+ }
+}
+
# CRT --------------------------------------------------------------------------
# Configures how the runtime library (CRT) is going to be used.
« no previous file with comments | « no previous file | chrome/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698