| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 # Clang runtime libraries, such as the sanitizer runtimes, live here. | 97 # Clang runtime libraries, such as the sanitizer runtimes, live here. |
| 98 lib_dirs = [ "//third_party/llvm-build/Release+Asserts/lib/clang/3.9.0/lib/w
indows" ] | 98 lib_dirs = [ "//third_party/llvm-build/Release+Asserts/lib/clang/3.9.0/lib/w
indows" ] |
| 99 } | 99 } |
| 100 | 100 |
| 101 if (is_syzyasan) { | 101 if (is_syzyasan) { |
| 102 # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs. | 102 # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs. |
| 103 assert(!is_win_fastlink, "/PROFILE and /DEBUG:FASTLINK are incompatible") | 103 assert(!is_win_fastlink, "/PROFILE and /DEBUG:FASTLINK are incompatible") |
| 104 ldflags = [ "/PROFILE" ] | 104 ldflags = [ "/PROFILE" ] |
| 105 } | 105 } |
| 106 |
| 107 # arflags apply only to static_libraries. The normal linker configs are only |
| 108 # set for executable and shared library targets so arflags must be set |
| 109 # elsewhere. Since this is relatively contained, we just apply them in this |
| 110 # more general config and they will only have an effect on static libraries. |
| 111 arflags = [ |
| 112 # "No public symbols found; archive member will be inaccessible." This |
| 113 # means that one or more object files in the library can never be |
| 114 # pulled in to targets that link to this library. It's just a warning that |
| 115 # the source file is a no-op. |
| 116 "/ignore:4221", |
| 117 ] |
| 106 } | 118 } |
| 107 | 119 |
| 108 config("vs_code_analysis") { | 120 config("vs_code_analysis") { |
| 109 if (use_vs_code_analysis) { | 121 if (use_vs_code_analysis) { |
| 110 # When use_vs_code_analysis is specified add the /analyze switch to enable | 122 # When use_vs_code_analysis is specified add the /analyze switch to enable |
| 111 # static analysis. Specifying /analyze:WX- says that /analyze warnings | 123 # static analysis. Specifying /analyze:WX- says that /analyze warnings |
| 112 # should not be treated as errors. | 124 # should not be treated as errors. |
| 113 cflags = [ "/analyze:WX-" ] | 125 cflags = [ "/analyze:WX-" ] |
| 114 | 126 |
| 115 # Also, disable various noisy warnings that have low value. | 127 # Also, disable various noisy warnings that have low value. |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 400 |
| 389 # Internal stuff -------------------------------------------------------------- | 401 # Internal stuff -------------------------------------------------------------- |
| 390 | 402 |
| 391 # Config used by the MIDL template to disable warnings. | 403 # Config used by the MIDL template to disable warnings. |
| 392 config("midl_warnings") { | 404 config("midl_warnings") { |
| 393 if (is_clang) { | 405 if (is_clang) { |
| 394 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". | 406 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". |
| 395 cflags = [ "-Wno-extra-tokens" ] | 407 cflags = [ "-Wno-extra-tokens" ] |
| 396 } | 408 } |
| 397 } | 409 } |
| OLD | NEW |