summaryrefslogtreecommitdiffstats
path: root/chromium/build/config/win/BUILD.gn
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-29 10:46:47 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-11-02 12:02:10 +0000
commit99677208ff3b216fdfec551fbe548da5520cd6fb (patch)
tree476a4865c10320249360e859d8fdd3e01833b03a /chromium/build/config/win/BUILD.gn
parentc30a6232df03e1efbd9f3b226777b07e087a1122 (diff)
BASELINE: Update Chromium to 86.0.4240.124
Change-Id: Ide0ff151e94cd665ae6521a446995d34a9d1d644 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/build/config/win/BUILD.gn')
-rw-r--r--chromium/build/config/win/BUILD.gn28
1 files changed, 15 insertions, 13 deletions
diff --git a/chromium/build/config/win/BUILD.gn b/chromium/build/config/win/BUILD.gn
index c0758b654af..6cc4b1b9f4d 100644
--- a/chromium/build/config/win/BUILD.gn
+++ b/chromium/build/config/win/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni")
import("//build/config/clang/clang.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/sanitizers/sanitizers.gni")
+import("//build/config/win/control_flow_guard.gni")
import("//build/config/win/visual_studio_version.gni")
import("//build/timestamp.gni")
import("//build/toolchain/goma.gni")
@@ -89,11 +90,15 @@ config("compiler") {
# Tell clang which version of MSVC to emulate.
cflags += [ "-fmsc-version=1916" ]
- # Emit table of address-taken functions for Control-Flow Guard (CFG). We
- # don't emit the CFG checks themselves, but this enables the functions to
- # be called by code that is built with those checks enabled, such as system
- # libraries.
- cflags += [ "/guard:cf,nochecks" ]
+ # Emit table of address-taken functions for Control-Flow Guard (CFG).
+ # This is needed to allow functions to be called by code that is built
+ # with CFG enabled, such as system libraries.
+ # The CFG guards are only emitted if |win_enable_cfg_guards| is enabled.
+ if (win_enable_cfg_guards) {
+ cflags += [ "/guard:cf" ]
+ } else {
+ cflags += [ "/guard:cf,nochecks" ]
+ }
if (is_component_build) {
cflags += [
@@ -266,7 +271,7 @@ config("runtime_library") {
# manually override this config for their compiles.
config("winver") {
defines = [
- "NTDDI_VERSION=NTDDI_WIN10_RS2",
+ "NTDDI_VERSION=NTDDI_WIN10_VB",
# We can't say `=_WIN32_WINNT_WIN10` here because some files do
# `#if WINVER < 0x0600` without including windows.h before,
@@ -344,17 +349,14 @@ config("common_linker_setup") {
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
+ # /DYNAMICBASE (ASLR) is turned off in debug builds, therefore CFG cannot be
# turned on either.
- # CFG seems to lead to random corruption with incremental linking so turn off
- # CFG in component builds. https://crbug.com/812421
# ASan and CFG leads to slow process startup. Chromium's test runner uses
# lots of child processes, so this means things are really slow. Disable CFG
# for now. https://crbug.com/846966
- if (!is_debug && !is_component_build && !is_asan) {
- # Turn on CFG, except for longjmp because it relies on compiler support
- # which clang doesn't have yet.
- ldflags = [ "/guard:cf,nolongjmp" ]
+ if (!is_debug && !is_asan) {
+ # Turn on CFG bitmap generation and CFG load config.
+ ldflags = [ "/guard:cf" ]
}
}