summaryrefslogtreecommitdiffstats
path: root/build/config
diff options
context:
space:
mode:
authorfdegans@chromium.org <fdegans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-17 15:41:51 +0000
committerfdegans@chromium.org <fdegans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-17 15:41:51 +0000
commita51494e0629492936ccc313c9c00e47021b9dcae (patch)
treea62c019df19b969b0f3387d9e6340701aa035aa1 /build/config
parent4dda6a6cb797c4aab5fa82be360687c72d9079d2 (diff)
downloadchromium_src-a51494e0629492936ccc313c9c00e47021b9dcae.zip
chromium_src-a51494e0629492936ccc313c9c00e47021b9dcae.tar.gz
chromium_src-a51494e0629492936ccc313c9c00e47021b9dcae.tar.bz2
Changed android toolchain to use GCC 4.8
BUG=359106 Review URL: https://codereview.chromium.org/218633007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271207 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/config')
-rw-r--r--build/config/android/config.gni2
-rw-r--r--build/config/arm.gni2
-rw-r--r--build/config/compiler/BUILD.gn26
-rw-r--r--build/config/gcc/gcc_version.gni11
4 files changed, 36 insertions, 5 deletions
diff --git a/build/config/android/config.gni b/build/config/android/config.gni
index dc0a384..f28165b 100644
--- a/build/config/android/config.gni
+++ b/build/config/android/config.gni
@@ -58,7 +58,7 @@ if (is_android) {
# Toolchain root directory for each build. The actual binaries are inside
# a "bin" directory inside of these.
- _android_toolchain_version = "4.6"
+ _android_toolchain_version = "4.8"
x86_android_toolchain_root = "$android_ndk_root/toolchains/x86-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androideabi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-android-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
diff --git a/build/config/arm.gni b/build/config/arm.gni
index f9c6cdc..d3ed3c6 100644
--- a/build/config/arm.gni
+++ b/build/config/arm.gni
@@ -40,7 +40,7 @@ if (cpu_arch == "arm") {
} else if (arm_version == 7) {
arm_arch = "armv7-a"
- arm_tune = ""
+ arm_tune = "generic-armv7-a"
if (arm_float_abi == "") {
arm_float_abi = "softfp"
}
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index d0e5904..1252652 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/gcc/gcc_version.gni")
import("//build/config/android/config.gni")
if (cpu_arch == "arm") {
import("//build/config/arm.gni")
@@ -216,8 +217,19 @@ config("compiler") {
"-fno-short-enums",
]
if (!is_clang) {
- # Clang doesn't support this one.
- cflags += [ "-finline-limit=64" ]
+ # Clang doesn't support these flags.
+ cflags += [
+ "-finline-limit=64",
+ # The following 6 options are disabled to save on
+ # binary size in gcc 4.8.
+ # TODO(fdegans) Reevaluate when we upgrade GCC.
+ "-fno-partial-inlining",
+ "-fno-early-inlining",
+ "-fno-tree-copy-prop",
+ "-fno-tree-loop-optimize",
+ "-fno-move-loop-invariants",
+ "-fno-caller-saves",
+ ]
}
if (is_android_webview_build) {
# Android predefines this as 1; undefine it here so Chromium can redefine
@@ -609,6 +621,15 @@ config("default_warnings") {
"-Wno-sign-promo",
]
}
+
+ if (gcc_version >= 48) {
+ # Don't warn about the "typedef 'foo' locally defined but not used"
+ # for gcc 4.8.
+ # TODO: remove this flag once all builds work. See crbug.com/227506
+ cflags += [
+ "-Wno-unused-local-typedefs",
+ ]
+ }
}
}
@@ -751,4 +772,3 @@ config("no_symbols") {
cflags = [ "-g0" ]
}
}
-
diff --git a/build/config/gcc/gcc_version.gni b/build/config/gcc/gcc_version.gni
new file mode 100644
index 0000000..7e8d2e9
--- /dev/null
+++ b/build/config/gcc/gcc_version.gni
@@ -0,0 +1,11 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+declare_args() {
+ if (is_android) {
+ gcc_version = 48
+ } else {
+ gcc_version = exec_script("../../compiler_version.py", [ "host", "compiler" ], "value")
+ }
+}