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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 } | 95 } |
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 = [ "$clang_base_path/lib/clang/$clang_version/lib/windows" ] | 98 lib_dirs = [ "$clang_base_path/lib/clang/$clang_version/lib/windows" ] |
99 } | 99 } |
100 | 100 |
101 # Ensures that the PDB file contains FIXUP information (growing the PDB file | 101 # Ensures that the PDB file contains FIXUP information (growing the PDB file |
102 # by about 5%) but does not otherwise alter the output binary. This | 102 # by about 5%) but does not otherwise alter the output binary. This |
103 # information is used by the Syzygy optimization tool when decomposing the | 103 # information is used by the Syzygy optimization tool when decomposing the |
104 # release image. | 104 # release image. |
105 if (!is_debug && !is_win_fastlink && !is_clang) { | 105 if (!is_debug && !is_win_fastlink && !is_clang && !is_component_build) { |
Peter Kasting
2016/09/14 01:15:17
Should this match the condition on line 317? I'm
brucedawson
2016/09/14 17:49:25
I had been thinking that it didn't really matter -
| |
106 ldflags = [ "/PROFILE" ] | 106 ldflags = [ "/PROFILE" ] |
107 } | 107 } |
108 | 108 |
109 # arflags apply only to static_libraries. The normal linker configs are only | 109 # arflags apply only to static_libraries. The normal linker configs are only |
110 # set for executable and shared library targets so arflags must be set | 110 # set for executable and shared library targets so arflags must be set |
111 # elsewhere. Since this is relatively contained, we just apply them in this | 111 # elsewhere. Since this is relatively contained, we just apply them in this |
112 # more general config and they will only have an effect on static libraries. | 112 # more general config and they will only have an effect on static libraries. |
113 arflags = [ | 113 arflags = [ |
114 # "No public symbols found; archive member will be inaccessible." This | 114 # "No public symbols found; archive member will be inaccessible." This |
115 # means that one or more object files in the library can never be | 115 # means that one or more object files in the library can never be |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
305 } | 305 } |
306 config("windowed") { | 306 config("windowed") { |
307 ldflags = [ "/SUBSYSTEM:WINDOWS$subsystem_version_suffix" ] | 307 ldflags = [ "/SUBSYSTEM:WINDOWS$subsystem_version_suffix" ] |
308 } | 308 } |
309 | 309 |
310 # Incremental linking ---------------------------------------------------------- | 310 # Incremental linking ---------------------------------------------------------- |
311 | 311 |
312 incremental_linking_on_switch = [ "/INCREMENTAL" ] | 312 incremental_linking_on_switch = [ "/INCREMENTAL" ] |
313 incremental_linking_off_switch = [ "/INCREMENTAL:NO" ] | 313 incremental_linking_off_switch = [ "/INCREMENTAL:NO" ] |
314 | 314 |
315 # Disable incremental linking for syzyasan | 315 # Disable incremental linking for syzyasan, enable for debug builds and all |
316 if (is_debug && !is_syzyasan) { | 316 # component builds - any builds where performance is not job one. |
317 if ((is_debug || is_component_build) && !is_syzyasan) { | |
317 default_incremental_linking_switch = incremental_linking_on_switch | 318 default_incremental_linking_switch = incremental_linking_on_switch |
318 } else { | 319 } else { |
319 default_incremental_linking_switch = incremental_linking_off_switch | 320 default_incremental_linking_switch = incremental_linking_off_switch |
320 } | 321 } |
321 | 322 |
322 # Applies incremental linking or not depending on the current configuration. | 323 # Applies incremental linking or not depending on the current configuration. |
323 config("default_incremental_linking") { | 324 config("default_incremental_linking") { |
324 ldflags = default_incremental_linking_switch | 325 ldflags = default_incremental_linking_switch |
325 } | 326 } |
326 | 327 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
392 | 393 |
393 # Internal stuff -------------------------------------------------------------- | 394 # Internal stuff -------------------------------------------------------------- |
394 | 395 |
395 # Config used by the MIDL template to disable warnings. | 396 # Config used by the MIDL template to disable warnings. |
396 config("midl_warnings") { | 397 config("midl_warnings") { |
397 if (is_clang) { | 398 if (is_clang) { |
398 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". | 399 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". |
399 cflags = [ "-Wno-extra-tokens" ] | 400 cflags = [ "-Wno-extra-tokens" ] |
400 } | 401 } |
401 } | 402 } |
OLD | NEW |