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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 # Clang runtime libraries, such as the sanitizer runtimes, live here. | 80 # Clang runtime libraries, such as the sanitizer runtimes, live here. |
81 lib_dirs = [ "$clang_base_path/lib/clang/$clang_version/lib/windows" ] | 81 lib_dirs = [ "$clang_base_path/lib/clang/$clang_version/lib/windows" ] |
82 } | 82 } |
83 | 83 |
84 # /PROFILE ensures that the PDB file contains FIXUP information (growing the | 84 # /PROFILE ensures that the PDB file contains FIXUP information (growing the |
85 # PDB file by about 5%) but does not otherwise alter the output binary. This | 85 # PDB file by about 5%) but does not otherwise alter the output binary. This |
86 # information is used by the Syzygy optimization tool when decomposing the | 86 # information is used by the Syzygy optimization tool when decomposing the |
87 # release image. It is enabled for syzyasan builds and opportunistically for | 87 # release image. It is enabled for syzyasan builds and opportunistically for |
88 # other builds where it is not prohibited (not supported when incrementally | 88 # other builds where it is not prohibited (not supported when incrementally |
89 # linking, using /debug:fastlink, or building with clang). | 89 # linking, or using /debug:fastlink). |
90 if (is_syzyasan) { | 90 if (is_syzyasan) { |
91 assert(!is_win_fastlink) | 91 assert(!is_win_fastlink) |
92 ldflags = [ "/PROFILE" ] | 92 ldflags = [ "/PROFILE" ] |
93 } else { | 93 } else { |
94 if (!is_debug && !is_component_build) { | 94 if (!is_debug && !is_component_build) { |
95 if (is_win_fastlink || is_clang) { | 95 if (is_win_fastlink) { |
96 # /PROFILE implies the following linker flags. Therefore if we are | 96 # /PROFILE implies the following linker flags. Therefore if we are |
97 # skipping /PROFILE because it is incompatible with /DEBUG:FASTLINK | 97 # skipping /PROFILE because it is incompatible with /DEBUG:FASTLINK |
98 # we should explicitly add these flags in order to avoid unintended | 98 # we should explicitly add these flags in order to avoid unintended |
99 # consequences such as larger binaries. | 99 # consequences such as larger binaries. |
100 ldflags = [ | 100 ldflags = [ |
101 "/OPT:REF", | 101 "/OPT:REF", |
102 "/OPT:ICF", | 102 "/OPT:ICF", |
103 "/INCREMENTAL:NO", | 103 "/INCREMENTAL:NO", |
104 "/FIXED:NO", | 104 "/FIXED:NO", |
105 ] | 105 ] |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 | 415 |
416 # Internal stuff -------------------------------------------------------------- | 416 # Internal stuff -------------------------------------------------------------- |
417 | 417 |
418 # Config used by the MIDL template to disable warnings. | 418 # Config used by the MIDL template to disable warnings. |
419 config("midl_warnings") { | 419 config("midl_warnings") { |
420 if (is_clang) { | 420 if (is_clang) { |
421 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". | 421 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_". |
422 cflags = [ "-Wno-extra-tokens" ] | 422 cflags = [ "-Wno-extra-tokens" ] |
423 } | 423 } |
424 } | 424 } |
OLD | NEW |