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/compiler/compiler.gni") | 5 import("//build/config/compiler/compiler.gni") |
6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
7 import("//build/config/win/visual_studio_version.gni") | 7 import("//build/config/win/visual_studio_version.gni") |
8 | 8 |
9 assert(is_win) | 9 assert(is_win) |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 # line, only /safeseh. This is only accepted by ml.exe, not ml64.exe. | 29 # line, only /safeseh. This is only accepted by ml.exe, not ml64.exe. |
30 "/safeseh", | 30 "/safeseh", |
31 ] | 31 ] |
32 } | 32 } |
33 | 33 |
34 cflags = [ | 34 cflags = [ |
35 "/Gy", # Enable function-level linking. | 35 "/Gy", # Enable function-level linking. |
36 "/GS", # Enable buffer security checking. | 36 "/GS", # Enable buffer security checking. |
37 "/FS", # Preserve previous PDB behavior. | 37 "/FS", # Preserve previous PDB behavior. |
38 "/bigobj", # Some of our files are bigger than the regular limits. | 38 "/bigobj", # Some of our files are bigger than the regular limits. |
39 | |
40 # Tell the compiler to crash on failures. This is undocumented | |
41 # and unsupported but very handy. | |
42 "/d2FastFail", | |
43 ] | 39 ] |
44 | 40 |
45 # Force C/C++ mode for the given GN detected file type. This is necessary | 41 # Force C/C++ mode for the given GN detected file type. This is necessary |
46 # for precompiled headers where the same source file is compiled in both | 42 # for precompiled headers where the same source file is compiled in both |
47 # modes. | 43 # modes. |
48 cflags_c = [ "/TC" ] | 44 cflags_c = [ "/TC" ] |
49 cflags_cc = [ "/TP" ] | 45 cflags_cc = [ "/TP" ] |
50 | 46 |
51 if (visual_studio_version == "2015") { | 47 if (visual_studio_version == "2015") { |
52 cflags += [ | 48 cflags += [ |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 | 374 |
379 # Internal stuff -------------------------------------------------------------- | 375 # Internal stuff -------------------------------------------------------------- |
380 | 376 |
381 # Config used by the MIDL template to disable warnings. | 377 # Config used by the MIDL template to disable warnings. |
382 config("midl_warnings") { | 378 config("midl_warnings") { |
383 if (is_clang) { | 379 if (is_clang) { |
384 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". | 380 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". |
385 cflags = [ "-Wno-extra-tokens" ] | 381 cflags = [ "-Wno-extra-tokens" ] |
386 } | 382 } |
387 } | 383 } |
OLD | NEW |