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 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 # Specify the current PGO phase, only used for the Windows MSVS build. Here's | 24 # Specify the current PGO phase, only used for the Windows MSVS build. Here's |
25 # the different values that can be used: | 25 # the different values that can be used: |
26 # 0 : Means that PGO is turned off. | 26 # 0 : Means that PGO is turned off. |
27 # 1 : Used during the PGI (instrumentation) phase. | 27 # 1 : Used during the PGI (instrumentation) phase. |
28 # 2 : Used during the PGO (optimization) phase. | 28 # 2 : Used during the PGO (optimization) phase. |
29 # | 29 # |
30 # TODO(sebmarchand): Add support for the PGU (update) phase. | 30 # TODO(sebmarchand): Add support for the PGU (update) phase. |
31 chrome_pgo_phase = 0 | 31 chrome_pgo_phase = 0 |
32 | 32 |
33 # Whether or not the official builds should be build with full WPO. | 33 # Whether or not the official builds should be built with full WPO. Enabled by |
34 full_wpo_on_official = false | 34 # default for the PGO and the x64 builds. |
| 35 if (chrome_pgo_phase > 0 || target_cpu == "x64") { |
| 36 full_wpo_on_official = true |
| 37 } else { |
| 38 full_wpo_on_official = false |
| 39 } |
35 } | 40 } |
36 | 41 |
37 declare_args() { | 42 declare_args() { |
38 # Whether to use the gold linker from binutils instead of lld or bfd. | 43 # Whether to use the gold linker from binutils instead of lld or bfd. |
39 use_gold = !use_lld && !(is_chromecast && is_linux && | 44 use_gold = !use_lld && !(is_chromecast && is_linux && |
40 (current_cpu == "arm" || current_cpu == "mipsel")) && | 45 (current_cpu == "arm" || current_cpu == "mipsel")) && |
41 ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || | 46 ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || |
42 current_cpu == "arm")) || | 47 current_cpu == "arm")) || |
43 (is_android && (current_cpu == "x86" || current_cpu == "x64" || | 48 (is_android && (current_cpu == "x86" || current_cpu == "x64" || |
44 current_cpu == "arm"))) | 49 current_cpu == "arm"))) |
(...skipping 15 matching lines...) Expand all Loading... |
60 # Mac and Windows have them separate, so in Release Linux, default them off, | 65 # Mac and Windows have them separate, so in Release Linux, default them off, |
61 # but keep them on for Official builds and Chromecast builds. | 66 # but keep them on for Official builds and Chromecast builds. |
62 symbol_level = 2 | 67 symbol_level = 2 |
63 } else if (using_sanitizer) { | 68 } else if (using_sanitizer) { |
64 # Sanitizers require symbols for filename suppressions to work. | 69 # Sanitizers require symbols for filename suppressions to work. |
65 symbol_level = 1 | 70 symbol_level = 1 |
66 } else { | 71 } else { |
67 symbol_level = 0 | 72 symbol_level = 0 |
68 } | 73 } |
69 } | 74 } |
70 | |
71 # PGO requires full WPO. | |
72 if (chrome_pgo_phase > 0) { | |
73 full_wpo_on_official = true | |
74 } | |
OLD | NEW |