Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: build/config/compiler/compiler.gni

Issue 2547963002: [Chromecast] Use symbol_level=1 for 32-bit GCC toolchains.
Patch Set: Fix comment typo Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/android/config.gni ('k') | chrome/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/compiler.gni
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
index df12be920b53319190d9b60bb0994165e2000d43..32240d8f419cc64a65601855621849cec973ac40 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -66,6 +66,15 @@ declare_args() {
current_cpu == "arm" || current_cpu == "arm64")))
}
+# True if the target platform is a 64-bit architecture.
+is_target_cpu_64bit =
+ target_cpu == "x64" || target_cpu == "arm64" || target_cpu == "mips64el"
+if (!is_target_cpu_64bit) {
+ # Assert so that this variable is updated as new architectures are added.
+ assert(target_cpu == "x86" || target_cpu == "arm" || target_cpu == "mipsel",
+ "$target_cpu is not a supported architecture.")
+}
+
# If it wasn't manually set, set to an appropriate default.
assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level")
if (symbol_level == -1) {
@@ -73,10 +82,13 @@ if (symbol_level == -1) {
# With instrumentation enabled, debug info puts libchrome.so over 4gb, which
# causes the linker to produce an invalid ELF. http://crbug.com/574476
symbol_level = 0
- } else if (is_android && !is_component_build && !is_clang &&
- !(android_64bit_target_cpu && !build_apk_secondary_abi)) {
+ } else if (!is_component_build && !is_clang && ((is_chromecast &&
+ !is_target_cpu_64bit) ||
+ (is_android &&
+ (!is_target_cpu_64bit ||
+ build_apk_secondary_abi)))) {
# Reduce symbol level when it will cause invalid elf files to be created
- # (due to file size). https://crbug.com/648948.
+ # (due to file size): https://crbug.com/648948, https://crbug.com/670776
symbol_level = 1
} else if (is_win && use_goma && !is_clang) {
# goma doesn't support PDB files, so we disable symbols during goma
@@ -99,10 +111,11 @@ if (symbol_level == -1) {
}
# Assert that the configuration isn't going to hit https://crbug.com/648948.
-assert(ignore_elf32_limitations || !is_android ||
- (android_64bit_target_cpu && !build_apk_secondary_abi) ||
- is_component_build || symbol_level < 2 || is_clang,
- "Android 32-bit non-component, non-clang builds cannot have " +
- "symbol_level=2 due to 4GiB file size limit, see " +
+assert(ignore_elf32_limitations || is_component_build || symbol_level < 2 ||
+ is_clang ||
+ !(is_android && (!is_target_cpu_64bit || build_apk_secondary_abi)) ||
+ !(is_chromecast && !is_target_cpu_64bit),
+ "Android and Chromecast 32-bit non-component, non-clang builds cannot " +
+ "have symbol_level=2 due to 4GiB file size limit, see " +
"https://crbug.com/648948. If you really want to try this out, " +
"set ignore_elf32_limitations=true.")
« no previous file with comments | « build/config/android/config.gni ('k') | chrome/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698