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

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

Issue 2520373003: Use /OPT:REF in clang optimized static builds (Closed)
Patch Set: Created 4 years 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 | « no previous file | 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 # /PROFILE ensures that the PDB file contains FIXUP information (growing the 89 # /PROFILE ensures that the PDB file contains FIXUP information (growing the
90 # PDB file by about 5%) but does not otherwise alter the output binary. This 90 # PDB file 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) {
96 assert(!is_win_fastlink) 96 assert(!is_win_fastlink)
97 ldflags = [ "/PROFILE" ] 97 ldflags = [ "/PROFILE" ]
98 } else { 98 } else {
99 if (!is_debug && !is_component_build && !is_clang) { 99 if (!is_debug && !is_component_build) {
100 if (is_win_fastlink) { 100 if (is_win_fastlink || is_clang) {
101 # /PROFILE implies the following linker flags. Therefore if we are 101 # /PROFILE implies the following linker flags. Therefore if we are
102 # skipping /PROFILE because it is incompatible with /DEBUG:FASTLINK 102 # skipping /PROFILE because it is incompatible with /DEBUG:FASTLINK
103 # we should explicitly add these flags in order to avoid unintended 103 # we should explicitly add these flags in order to avoid unintended
104 # consequences such as larger binaries. 104 # consequences such as larger binaries.
105 ldflags = [ 105 ldflags = [
106 "/OPT:REF", 106 "/OPT:REF",
107 "/OPT:ICF", 107 "/OPT:ICF",
108 "/INCREMENTAL:NO", 108 "/INCREMENTAL:NO",
109 "/FIXED:NO", 109 "/FIXED:NO",
110 ] 110 ]
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 # Internal stuff -------------------------------------------------------------- 424 # Internal stuff --------------------------------------------------------------
425 425
426 # Config used by the MIDL template to disable warnings. 426 # Config used by the MIDL template to disable warnings.
427 config("midl_warnings") { 427 config("midl_warnings") {
428 if (is_clang) { 428 if (is_clang) {
429 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". 429 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_".
430 cflags = [ "-Wno-extra-tokens" ] 430 cflags = [ "-Wno-extra-tokens" ]
431 } 431 }
432 } 432 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698