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

Side by Side 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 nit fixes. 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 if (win_linker_timing) { 259 if (win_linker_timing) {
260 ldflags += [ 260 ldflags += [
261 "/time", 261 "/time",
262 "/verbose:incr", 262 "/verbose:incr",
263 ] 263 ]
264 } 264 }
265 } 265 }
266 266
267 # Control Flow Guard (CFG)
268 # https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065.aspx
269 config("win_msvc_cfg") {
270 # /DYNAMICBASE (ASLR) is turned off in debug builds, therefore CFG can’t be
271 # turned on either.
272 if (!is_clang && !is_debug) {
273 cflags = [ "/guard:cf" ]
274 ldflags = [ "/guard:cf" ]
275 }
276 }
277
267 # CRT -------------------------------------------------------------------------- 278 # CRT --------------------------------------------------------------------------
268 279
269 # Configures how the runtime library (CRT) is going to be used. 280 # Configures how the runtime library (CRT) is going to be used.
270 # See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of 281 # See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of
271 # what each value does. 282 # what each value does.
272 config("default_crt") { 283 config("default_crt") {
273 if (is_component_build) { 284 if (is_component_build) {
274 # Component mode: dynamic CRT. Since the library is shared, it requires 285 # Component mode: dynamic CRT. Since the library is shared, it requires
275 # exceptions or will give errors about things not matching, so keep 286 # exceptions or will give errors about things not matching, so keep
276 # exceptions on. 287 # exceptions on.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 418
408 # Internal stuff -------------------------------------------------------------- 419 # Internal stuff --------------------------------------------------------------
409 420
410 # Config used by the MIDL template to disable warnings. 421 # Config used by the MIDL template to disable warnings.
411 config("midl_warnings") { 422 config("midl_warnings") {
412 if (is_clang) { 423 if (is_clang) {
413 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". 424 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_".
414 cflags = [ "-Wno-extra-tokens" ] 425 cflags = [ "-Wno-extra-tokens" ]
415 } 426 }
416 } 427 }
OLDNEW
« 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