Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Side by Side Diff: build/config/win/BUILD.gn

Issue 2495643002: Make /fastlink builds as optimized as non-/fastlink builds (Closed)
Patch Set: Don't enable fastlink on minimal_symbols builds Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 # Clang runtime libraries, such as the sanitizer runtimes, live here. 85 # Clang runtime libraries, such as the sanitizer runtimes, live here.
86 lib_dirs = [ "$clang_base_path/lib/clang/$clang_version/lib/windows" ] 86 lib_dirs = [ "$clang_base_path/lib/clang/$clang_version/lib/windows" ]
87 } 87 }
88 88
89 # Ensures that the PDB file contains FIXUP information (growing the PDB file 89 # Ensures that the PDB file contains FIXUP information (growing the PDB file
90 # by about 5%) but does not otherwise alter the output binary. This 90 # by about 5%) but does not otherwise alter the output binary. This
91 # information is used by the Syzygy optimization tool when decomposing the 91 # information is used by the Syzygy optimization tool when decomposing the
92 # release image. It is enabled for syzyasan builds and opportunistically for 92 # release image. It is enabled for syzyasan builds and opportunistically for
93 # other builds where it is not prohibited (not supported when incrementally 93 # other builds where it is not prohibited (not supported when incrementally
94 # linking, using /debug:fastlink, or building with clang). 94 # linking, using /debug:fastlink, or building with clang).
95 if (is_syzyasan || 95 if (is_syzyasan || (!is_debug && !is_component_build && !is_clang)) {
96 (!is_debug && !is_component_build && !is_win_fastlink && !is_clang)) { 96 if (is_win_fastlink) {
scottmg 2016/11/10 21:56:27 I think this changes the behaviour for is_syzyasan
brucedawson 2016/11/10 22:04:06 Good catch. Logic is hard. Agreed that it probably
brucedawson 2016/11/14 21:34:55 Done.
97 ldflags = [ "/PROFILE" ] 97 # /PROFILE implies the following linker flags. Therefore if we are
98 # skipping /PROFILE because it is incompatible with /DEBUG:FASTLINK
99 # we should explicitly add these flags in order to avoid unintended
100 # consequences such as larger binaries.
101 ldflags = [
102 "/OPT:REF",
103 "/OPT:ICF",
104 "/INCREMENTAL:NO",
105 "/FIXED:NO",
106 ]
107 } else {
108 ldflags = [ "/PROFILE" ]
109 }
98 } 110 }
99 111
100 # arflags apply only to static_libraries. The normal linker configs are only 112 # arflags apply only to static_libraries. The normal linker configs are only
101 # set for executable and shared library targets so arflags must be set 113 # set for executable and shared library targets so arflags must be set
102 # elsewhere. Since this is relatively contained, we just apply them in this 114 # elsewhere. Since this is relatively contained, we just apply them in this
103 # more general config and they will only have an effect on static libraries. 115 # more general config and they will only have an effect on static libraries.
104 arflags = [ 116 arflags = [
105 # "No public symbols found; archive member will be inaccessible." This 117 # "No public symbols found; archive member will be inaccessible." This
106 # means that one or more object files in the library can never be 118 # means that one or more object files in the library can never be
107 # pulled in to targets that link to this library. It's just a warning that 119 # pulled in to targets that link to this library. It's just a warning that
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 418
407 # Internal stuff -------------------------------------------------------------- 419 # Internal stuff --------------------------------------------------------------
408 420
409 # Config used by the MIDL template to disable warnings. 421 # Config used by the MIDL template to disable warnings.
410 config("midl_warnings") { 422 config("midl_warnings") {
411 if (is_clang) { 423 if (is_clang) {
412 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". 424 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_".
413 cflags = [ "-Wno-extra-tokens" ] 425 cflags = [ "-Wno-extra-tokens" ]
414 } 426 }
415 } 427 }
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698