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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |