| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 if (current_os != "win") { | 287 if (current_os != "win") { |
| 288 # WindowsRT: use the dynamic CRT. | 288 # WindowsRT: use the dynamic CRT. |
| 289 configs = [ ":dynamic_crt" ] | 289 configs = [ ":dynamic_crt" ] |
| 290 } else { | 290 } else { |
| 291 # Desktop Windows: static CRT. | 291 # Desktop Windows: static CRT. |
| 292 configs = [ ":static_crt" ] | 292 configs = [ ":static_crt" ] |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 | 296 |
| 297 # Use this to force the debug CRT for when building perf-critical build tools |
| 298 # that need to be fully optimized even in debug builds, for those times when the |
| 299 # debug CRT is part of the bottleneck. This also avoids *implicitly* defining |
| 300 # _DEBUG. |
| 301 config("release_crt") { |
| 302 if (is_component_build) { |
| 303 cflags = [ "/MD" ] |
| 304 } else { |
| 305 cflags = [ "/MT" ] |
| 306 } |
| 307 } |
| 308 |
| 297 config("dynamic_crt") { | 309 config("dynamic_crt") { |
| 298 if (is_debug) { | 310 if (is_debug) { |
| 311 # This pulls in the DLL debug CRT and defines _DEBUG |
| 299 cflags = [ "/MDd" ] | 312 cflags = [ "/MDd" ] |
| 300 } else { | 313 } else { |
| 301 cflags = [ "/MD" ] | 314 cflags = [ "/MD" ] |
| 302 } | 315 } |
| 303 } | 316 } |
| 304 | 317 |
| 305 config("static_crt") { | 318 config("static_crt") { |
| 306 if (is_debug) { | 319 if (is_debug) { |
| 320 # This pulls in the static debug CRT and defines _DEBUG |
| 307 cflags = [ "/MTd" ] | 321 cflags = [ "/MTd" ] |
| 308 } else { | 322 } else { |
| 309 cflags = [ "/MT" ] | 323 cflags = [ "/MT" ] |
| 310 } | 324 } |
| 311 } | 325 } |
| 312 | 326 |
| 313 # Subsystem -------------------------------------------------------------------- | 327 # Subsystem -------------------------------------------------------------------- |
| 314 | 328 |
| 315 # This is appended to the subsystem to specify a minimum version. | 329 # This is appended to the subsystem to specify a minimum version. |
| 316 if (current_cpu == "x64") { | 330 if (current_cpu == "x64") { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 | 429 |
| 416 # Internal stuff -------------------------------------------------------------- | 430 # Internal stuff -------------------------------------------------------------- |
| 417 | 431 |
| 418 # Config used by the MIDL template to disable warnings. | 432 # Config used by the MIDL template to disable warnings. |
| 419 config("midl_warnings") { | 433 config("midl_warnings") { |
| 420 if (is_clang) { | 434 if (is_clang) { |
| 421 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". | 435 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". |
| 422 cflags = [ "-Wno-extra-tokens" ] | 436 cflags = [ "-Wno-extra-tokens" ] |
| 423 } | 437 } |
| 424 } | 438 } |
| OLD | NEW |