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/arm.gni") | 6 import("//build/config/arm.gni") |
7 import("//build/config/chrome_build.gni") | 7 import("//build/config/chrome_build.gni") |
8 import("//build/config/chromecast_build.gni") | 8 import("//build/config/chromecast_build.gni") |
9 import("//build/config/compiler/pgo/pgo.gni") | 9 import("//build/config/compiler/pgo/pgo.gni") |
10 import("//build/config/sanitizers/sanitizers.gni") | 10 import("//build/config/sanitizers/sanitizers.gni") |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 # default for the PGO and the x64 builds. | 114 # default for the PGO and the x64 builds. |
115 if (chrome_pgo_phase > 0) { | 115 if (chrome_pgo_phase > 0) { |
116 full_wpo_on_official = true | 116 full_wpo_on_official = true |
117 } else { | 117 } else { |
118 full_wpo_on_official = false | 118 full_wpo_on_official = false |
119 } | 119 } |
120 } | 120 } |
121 | 121 |
122 declare_args() { | 122 declare_args() { |
123 # Whether to use the gold linker from binutils instead of lld or bfd. | 123 # Whether to use the gold linker from binutils instead of lld or bfd. |
124 use_gold = !use_lld && !(is_chromecast && is_linux && | 124 use_gold = |
125 (current_cpu == "arm" || current_cpu == "mipsel")) && | 125 !use_lld && !(is_chromecast && is_linux && |
126 ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || | 126 (current_cpu == "arm" || current_cpu == "mipsel")) && |
127 current_cpu == "arm" || current_cpu == "mipsel")) || | 127 ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || |
128 (is_android && (current_cpu == "x86" || current_cpu == "x64" || | 128 current_cpu == "arm" || current_cpu == "mipsel")) || |
129 current_cpu == "arm" || current_cpu == "arm64"))) | 129 (is_android && (current_cpu == "x86" || current_cpu == "x64" || |
| 130 current_cpu == "arm" || current_cpu == "arm64")) || |
| 131 is_fuchsia) |
130 } | 132 } |
131 | 133 |
132 # If it wasn't manually set, set to an appropriate default. | 134 # If it wasn't manually set, set to an appropriate default. |
133 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level") | 135 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level") |
134 if (symbol_level == -1) { | 136 if (symbol_level == -1) { |
135 if (is_android && use_order_profiling) { | 137 if (is_android && use_order_profiling) { |
136 # With instrumentation enabled, debug info puts libchrome.so over 4gb, which | 138 # With instrumentation enabled, debug info puts libchrome.so over 4gb, which |
137 # causes the linker to produce an invalid ELF. http://crbug.com/574476 | 139 # causes the linker to produce an invalid ELF. http://crbug.com/574476 |
138 symbol_level = 0 | 140 symbol_level = 0 |
139 } else if (is_android && !is_component_build && | 141 } else if (is_android && !is_component_build && |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 173 } |
172 | 174 |
173 # Assert that the configuration isn't going to hit https://crbug.com/648948. | 175 # Assert that the configuration isn't going to hit https://crbug.com/648948. |
174 assert(ignore_elf32_limitations || !is_android || | 176 assert(ignore_elf32_limitations || !is_android || |
175 (android_64bit_target_cpu && !build_apk_secondary_abi) || | 177 (android_64bit_target_cpu && !build_apk_secondary_abi) || |
176 is_component_build || symbol_level < 2, | 178 is_component_build || symbol_level < 2, |
177 "Android 32-bit non-component builds cannot have symbol_level=2 " + | 179 "Android 32-bit non-component builds cannot have symbol_level=2 " + |
178 "due to 4GiB file size limit, see https://crbug.com/648948. " + | 180 "due to 4GiB file size limit, see https://crbug.com/648948. " + |
179 "If you really want to try this out, " + | 181 "If you really want to try this out, " + |
180 "set ignore_elf32_limitations=true.") | 182 "set ignore_elf32_limitations=true.") |
OLD | NEW |