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

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

Issue 2813823006: [Windows MSVC CFG] Link with CFG only on executables. (Closed)
Patch Set: Created 3 years, 8 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
« build/config/BUILD.gn ('K') | « build/config/BUILD.gn ('k') | no next file » | 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 3161b3e7c2e493fcc3e1d9e3588d31a3a0b767fc..215631366dac71b884c0583a7e93c18b53ac5772 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -252,6 +252,15 @@ config("common_linker_setup") {
ldflags += [ "/DYNAMICBASE" ]
}
+ if (win_linker_timing) {
+ ldflags += [
+ "/time",
+ "/verbose:incr",
+ ]
+ }
+}
+
+config("cfi_linker") {
# Control Flow Guard (CFG)
# https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065.aspx
# /DYNAMICBASE (ASLR) is turned off in debug builds, therefore CFG can’t be
@@ -259,14 +268,7 @@ config("common_linker_setup") {
# TODO(thakis): Turn this on with lld once supported, https://crbug.com/693709
if (!is_debug && !use_lld) {
# Turn on CFG in msvc linker, regardless of compiler used.
- ldflags += [ "/guard:cf" ]
- }
-
- if (win_linker_timing) {
- ldflags += [
- "/time",
- "/verbose:incr",
- ]
+ ldflags = [ "/guard:cf" ]
}
}
« build/config/BUILD.gn ('K') | « build/config/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698