| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/clang/clang.gni") | 5 import("//build/config/clang/clang.gni") |
| 6 import("//build/config/compiler/compiler.gni") | 6 import("//build/config/compiler/compiler.gni") |
| 7 import("//build/config/sanitizers/sanitizers.gni") | 7 import("//build/config/sanitizers/sanitizers.gni") |
| 8 import("//build/config/win/visual_studio_version.gni") | 8 import("//build/config/win/visual_studio_version.gni") |
| 9 import("//build/toolchain/toolchain.gni") | 9 import("//build/toolchain/toolchain.gni") |
| 10 | 10 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 # Chrome.dll module like chrome_<base address>, where <base address> | 245 # Chrome.dll module like chrome_<base address>, where <base address> |
| 246 # typically changes with each launch. This in turn means that breakpoints in | 246 # typically changes with each launch. This in turn means that breakpoints in |
| 247 # Chrome.dll don't stick from one launch to the next. For this reason, we | 247 # Chrome.dll don't stick from one launch to the next. For this reason, we |
| 248 # turn ASLR off in debug builds. | 248 # turn ASLR off in debug builds. |
| 249 if (is_debug) { | 249 if (is_debug) { |
| 250 ldflags += [ "/DYNAMICBASE:NO" ] | 250 ldflags += [ "/DYNAMICBASE:NO" ] |
| 251 } else { | 251 } else { |
| 252 ldflags += [ "/DYNAMICBASE" ] | 252 ldflags += [ "/DYNAMICBASE" ] |
| 253 } | 253 } |
| 254 | 254 |
| 255 if (win_linker_timing) { |
| 256 ldflags += [ |
| 257 "/time", |
| 258 "/verbose:incr", |
| 259 ] |
| 260 } |
| 261 } |
| 262 |
| 263 config("cfi_linker") { |
| 255 # Control Flow Guard (CFG) | 264 # Control Flow Guard (CFG) |
| 256 # https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065.aspx | 265 # https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065.aspx |
| 257 # /DYNAMICBASE (ASLR) is turned off in debug builds, therefore CFG can’t be | 266 # /DYNAMICBASE (ASLR) is turned off in debug builds, therefore CFG can’t be |
| 258 # turned on either. | 267 # turned on either. |
| 259 # TODO(thakis): Turn this on with lld once supported, https://crbug.com/693709 | 268 # TODO(thakis): Turn this on with lld once supported, https://crbug.com/693709 |
| 260 if (!is_debug && !use_lld) { | 269 if (!is_debug && !use_lld) { |
| 261 # Turn on CFG in msvc linker, regardless of compiler used. | 270 # Turn on CFG in msvc linker, regardless of compiler used. |
| 262 ldflags += [ "/guard:cf" ] | 271 ldflags = [ "/guard:cf" ] |
| 263 } | |
| 264 | |
| 265 if (win_linker_timing) { | |
| 266 ldflags += [ | |
| 267 "/time", | |
| 268 "/verbose:incr", | |
| 269 ] | |
| 270 } | 272 } |
| 271 } | 273 } |
| 272 | 274 |
| 273 # CRT -------------------------------------------------------------------------- | 275 # CRT -------------------------------------------------------------------------- |
| 274 | 276 |
| 275 # Configures how the runtime library (CRT) is going to be used. | 277 # Configures how the runtime library (CRT) is going to be used. |
| 276 # See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of | 278 # See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of |
| 277 # what each value does. | 279 # what each value does. |
| 278 config("default_crt") { | 280 config("default_crt") { |
| 279 if (is_component_build) { | 281 if (is_component_build) { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 | 415 |
| 414 # Internal stuff -------------------------------------------------------------- | 416 # Internal stuff -------------------------------------------------------------- |
| 415 | 417 |
| 416 # Config used by the MIDL template to disable warnings. | 418 # Config used by the MIDL template to disable warnings. |
| 417 config("midl_warnings") { | 419 config("midl_warnings") { |
| 418 if (is_clang) { | 420 if (is_clang) { |
| 419 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". | 421 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". |
| 420 cflags = [ "-Wno-extra-tokens" ] | 422 cflags = [ "-Wno-extra-tokens" ] |
| 421 } | 423 } |
| 422 } | 424 } |
| OLD | NEW |