OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
7 import("//build/config/chromecast_build.gni") | 7 import("//build/config/chromecast_build.gni") |
8 import("//build/config/sanitizers/sanitizers.gni") | 8 import("//build/config/sanitizers/sanitizers.gni") |
9 import("//build/toolchain/toolchain.gni") | 9 import("//build/toolchain/toolchain.gni") |
10 | 10 |
11 declare_args() { | 11 declare_args() { |
12 # How many symbols to include in the build. This affects the performance of | 12 # How many symbols to include in the build. This affects the performance of |
13 # the build since the symbols are large and dealing with them is slow. | 13 # the build since the symbols are large and dealing with them is slow. |
14 # 2 means regular build with symbols. | 14 # 2 means regular build with symbols. |
15 # 1 means minimal symbols, usually enough for backtraces only. | 15 # 1 means minimal symbols, usually enough for backtraces only. |
16 # 0 means no symbols. | 16 # 0 means no symbols. |
17 # -1 means auto-set according to debug/release and platform. | 17 # -1 means auto-set according to debug/release and platform. |
18 symbol_level = -1 | 18 symbol_level = -1 |
19 | 19 |
20 # Compile in such a way as to enable profiling of the generated code. For | 20 # Compile in such a way as to enable profiling of the generated code. For |
21 # example, don't omit the frame pointer and leave in symbols. | 21 # example, don't omit the frame pointer and leave in symbols. |
22 enable_profiling = false | 22 enable_profiling = false |
23 | 23 |
| 24 # use_debug_fission: whether to use split DWARF debug info |
| 25 # files. This can reduce link time significantly, but is incompatible |
| 26 # with some utilities such as icecc and ccache. Requires gold and |
| 27 # gcc >= 4.8 or clang. |
| 28 # http://gcc.gnu.org/wiki/DebugFission |
| 29 # |
| 30 # This is a placeholder value indicating that the code below should set |
| 31 # the default. This is necessary to delay the evaluation of the default |
| 32 # value expression until after its input values such as use_gold have |
| 33 # been set, e.g. by a toolchain_args() block. |
| 34 use_debug_fission = "default" |
| 35 |
| 36 # Tell VS to create a PDB that references information in .obj files rather |
| 37 # than copying it all. This should improve linker performance. mspdbcmf.exe |
| 38 # can be used to convert a fastlink pdb to a normal one. |
| 39 is_win_fastlink = false |
| 40 |
24 # Specify the current PGO phase, only used for the Windows MSVS build. Here's | 41 # Specify the current PGO phase, only used for the Windows MSVS build. Here's |
25 # the different values that can be used: | 42 # the different values that can be used: |
26 # 0 : Means that PGO is turned off. | 43 # 0 : Means that PGO is turned off. |
27 # 1 : Used during the PGI (instrumentation) phase. | 44 # 1 : Used during the PGI (instrumentation) phase. |
28 # 2 : Used during the PGO (optimization) phase. | 45 # 2 : Used during the PGO (optimization) phase. |
29 # | 46 # |
30 # TODO(sebmarchand): Add support for the PGU (update) phase. | 47 # TODO(sebmarchand): Add support for the PGU (update) phase. |
31 chrome_pgo_phase = 0 | 48 chrome_pgo_phase = 0 |
| 49 } |
32 | 50 |
| 51 declare_args() { |
33 # Whether or not the official builds should be built with full WPO. Enabled by | 52 # Whether or not the official builds should be built with full WPO. Enabled by |
34 # default for the PGO and the x64 builds. | 53 # default for the PGO and the x64 builds. |
35 if (chrome_pgo_phase > 0 || target_cpu == "x64") { | 54 if (chrome_pgo_phase > 0 || target_cpu == "x64") { |
36 full_wpo_on_official = true | 55 full_wpo_on_official = true |
37 } else { | 56 } else { |
38 full_wpo_on_official = false | 57 full_wpo_on_official = false |
39 } | 58 } |
40 | |
41 # use_debug_fission: whether to use split DWARF debug info | |
42 # files. This can reduce link time significantly, but is incompatible | |
43 # with some utilities such as icecc and ccache. Requires gold and | |
44 # gcc >= 4.8 or clang. | |
45 # http://gcc.gnu.org/wiki/DebugFission | |
46 # | |
47 # This is a placeholder value indicating that the code below should set | |
48 # the default. This is necessary to delay the evaluation of the default | |
49 # value expression until after its input values such as use_gold have | |
50 # been set, e.g. by a toolchain_args() block. | |
51 use_debug_fission = "default" | |
52 } | 59 } |
53 | 60 |
54 declare_args() { | 61 declare_args() { |
| 62 # Generate Syzygy optimized binaries. Syzygy optimize mode is a profile |
| 63 # guided optimization that reorders code for better locality. |
| 64 syzygy_optimize = is_win && target_cpu == "x86" && is_official_build && |
| 65 !is_clang && !is_win_fastlink && symbol_level == 2 |
| 66 } |
| 67 |
| 68 declare_args() { |
55 # Whether to use the gold linker from binutils instead of lld or bfd. | 69 # Whether to use the gold linker from binutils instead of lld or bfd. |
56 use_gold = !use_lld && !(is_chromecast && is_linux && | 70 use_gold = !use_lld && !(is_chromecast && is_linux && |
57 (current_cpu == "arm" || current_cpu == "mipsel")) && | 71 (current_cpu == "arm" || current_cpu == "mipsel")) && |
58 ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || | 72 ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || |
59 current_cpu == "arm" || current_cpu == "mipsel")) || | 73 current_cpu == "arm" || current_cpu == "mipsel")) || |
60 (is_android && (current_cpu == "x86" || current_cpu == "x64" || | 74 (is_android && (current_cpu == "x86" || current_cpu == "x64" || |
61 current_cpu == "arm"))) | 75 current_cpu == "arm"))) |
62 } | 76 } |
63 | 77 |
64 # If it wasn't manually set, set to an appropriate default. | 78 # If it wasn't manually set, set to an appropriate default. |
(...skipping 12 matching lines...) Expand all Loading... |
77 # Mac and Windows have them separate, so in Release Linux, default them off, | 91 # Mac and Windows have them separate, so in Release Linux, default them off, |
78 # but keep them on for Official builds and Chromecast builds. | 92 # but keep them on for Official builds and Chromecast builds. |
79 symbol_level = 2 | 93 symbol_level = 2 |
80 } else if (using_sanitizer) { | 94 } else if (using_sanitizer) { |
81 # Sanitizers require symbols for filename suppressions to work. | 95 # Sanitizers require symbols for filename suppressions to work. |
82 symbol_level = 1 | 96 symbol_level = 1 |
83 } else { | 97 } else { |
84 symbol_level = 0 | 98 symbol_level = 0 |
85 } | 99 } |
86 } | 100 } |
OLD | NEW |