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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 config("win_msvc_cfg") { | |
scottmg
2016/10/13 21:40:06
Also a brief comment here with an MSDN link for th
penny
2016/10/13 22:08:30
Done.
| |
268 if (visual_studio_version == "2015" && !is_clang) { | |
scottmg
2016/10/13 21:38:12
You can drop the version check, 2013 won't work fo
penny
2016/10/13 22:08:30
Done.
| |
269 cflags = [ "/guard:cf" ] | |
270 } | |
271 | |
272 # /DYNAMICBASE (ASLR) is turned off in debug builds, | |
273 # therefore CFG can’t be turned on either. | |
274 if (!is_debug && !is_clang) { | |
275 ldflags = [ "/guard:cf" ] | |
scottmg
2016/10/13 21:38:12
Doesn't seem much point in having /guard:cf passed
penny
2016/10/13 22:08:30
Done.
| |
276 } | |
277 } | |
278 | |
267 # CRT -------------------------------------------------------------------------- | 279 # CRT -------------------------------------------------------------------------- |
268 | 280 |
269 # Configures how the runtime library (CRT) is going to be used. | 281 # 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 | 282 # See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of |
271 # what each value does. | 283 # what each value does. |
272 config("default_crt") { | 284 config("default_crt") { |
273 if (is_component_build) { | 285 if (is_component_build) { |
274 # Component mode: dynamic CRT. Since the library is shared, it requires | 286 # Component mode: dynamic CRT. Since the library is shared, it requires |
275 # exceptions or will give errors about things not matching, so keep | 287 # exceptions or will give errors about things not matching, so keep |
276 # exceptions on. | 288 # exceptions on. |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
407 | 419 |
408 # Internal stuff -------------------------------------------------------------- | 420 # Internal stuff -------------------------------------------------------------- |
409 | 421 |
410 # Config used by the MIDL template to disable warnings. | 422 # Config used by the MIDL template to disable warnings. |
411 config("midl_warnings") { | 423 config("midl_warnings") { |
412 if (is_clang) { | 424 if (is_clang) { |
413 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". | 425 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". |
414 cflags = [ "-Wno-extra-tokens" ] | 426 cflags = [ "-Wno-extra-tokens" ] |
415 } | 427 } |
416 } | 428 } |
OLD | NEW |