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/compiler/pgo/pgo.gni") | 8 import("//build/config/compiler/pgo/pgo.gni") |
9 import("//build/config/sanitizers/sanitizers.gni") | 9 import("//build/config/sanitizers/sanitizers.gni") |
10 import("//build/toolchain/goma.gni") | 10 import("//build/toolchain/goma.gni") |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 # default for the PGO and the x64 builds. | 68 # default for the PGO and the x64 builds. |
69 if (chrome_pgo_phase > 0) { | 69 if (chrome_pgo_phase > 0) { |
70 full_wpo_on_official = true | 70 full_wpo_on_official = true |
71 } else { | 71 } else { |
72 full_wpo_on_official = false | 72 full_wpo_on_official = false |
73 } | 73 } |
74 } | 74 } |
75 | 75 |
76 declare_args() { | 76 declare_args() { |
77 # Whether to use the gold linker from binutils instead of lld or bfd. | 77 # Whether to use the gold linker from binutils instead of lld or bfd. |
78 use_gold = !use_lld && !(is_chromecast && is_linux && | 78 use_gold = |
79 (current_cpu == "arm" || current_cpu == "mipsel")) && | 79 !use_lld && !(is_chromecast && is_linux && |
80 ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || | 80 (current_cpu == "arm" || current_cpu == "mipsel")) && |
81 current_cpu == "arm" || current_cpu == "mipsel")) || | 81 ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || |
82 (is_android && (current_cpu == "x86" || current_cpu == "x64" || | 82 current_cpu == "arm" || current_cpu == "mipsel")) || |
83 current_cpu == "arm" || current_cpu == "arm64"))) | 83 (is_android && (current_cpu == "x86" || current_cpu == "x64" || |
| 84 current_cpu == "arm" || current_cpu == "arm64")) || |
| 85 is_fuchsia) |
84 } | 86 } |
85 | 87 |
86 # If it wasn't manually set, set to an appropriate default. | 88 # If it wasn't manually set, set to an appropriate default. |
87 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level") | 89 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level") |
88 if (symbol_level == -1) { | 90 if (symbol_level == -1) { |
89 if (is_android && use_order_profiling) { | 91 if (is_android && use_order_profiling) { |
90 # With instrumentation enabled, debug info puts libchrome.so over 4gb, which | 92 # With instrumentation enabled, debug info puts libchrome.so over 4gb, which |
91 # causes the linker to produce an invalid ELF. http://crbug.com/574476 | 93 # causes the linker to produce an invalid ELF. http://crbug.com/574476 |
92 symbol_level = 0 | 94 symbol_level = 0 |
93 } else if (is_android && !is_component_build && | 95 } else if (is_android && !is_component_build && |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 127 } |
126 | 128 |
127 # Assert that the configuration isn't going to hit https://crbug.com/648948. | 129 # Assert that the configuration isn't going to hit https://crbug.com/648948. |
128 assert(ignore_elf32_limitations || !is_android || | 130 assert(ignore_elf32_limitations || !is_android || |
129 (android_64bit_target_cpu && !build_apk_secondary_abi) || | 131 (android_64bit_target_cpu && !build_apk_secondary_abi) || |
130 is_component_build || symbol_level < 2, | 132 is_component_build || symbol_level < 2, |
131 "Android 32-bit non-component builds cannot have symbol_level=2 " + | 133 "Android 32-bit non-component builds cannot have symbol_level=2 " + |
132 "due to 4GiB file size limit, see https://crbug.com/648948. " + | 134 "due to 4GiB file size limit, see https://crbug.com/648948. " + |
133 "If you really want to try this out, " + | 135 "If you really want to try this out, " + |
134 "set ignore_elf32_limitations=true.") | 136 "set ignore_elf32_limitations=true.") |
OLD | NEW |