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

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 375483003: Change Android toolchain to GCC 4.9. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn fix (bis) Created 6 years, 3 months 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 if (cpu_arch == "arm") { 6 if (cpu_arch == "arm") {
7 import("//build/config/arm.gni") 7 import("//build/config/arm.gni")
8 } 8 }
9 if (is_posix) { 9 if (is_posix) {
10 import("//build/config/gcc/gcc_version.gni") 10 import("//build/config/gcc/gcc_version.gni")
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 ] 153 ]
154 if (arm_tune != "") { 154 if (arm_tune != "") {
155 cflags += [ "-mtune=$arm_tune" ] 155 cflags += [ "-mtune=$arm_tune" ]
156 } 156 }
157 if (arm_use_thumb) { 157 if (arm_use_thumb) {
158 cflags += [ "-mthumb" ] 158 cflags += [ "-mthumb" ]
159 if (is_android && !is_clang) { # Clang doesn't support this option. 159 if (is_android && !is_clang) { # Clang doesn't support this option.
160 cflags += [ "-mthumb-interwork" ] 160 cflags += [ "-mthumb-interwork" ]
161 } 161 }
162 } 162 }
163 if (!is_clang) {
164 # Clang doesn't support these flags.
165 cflags += [
166 # The tree-sra optimization (scalar replacement for
167 # aggregates enabling subsequent optimizations) leads to
168 # invalid code generation when using the Android NDK's
169 # compiler (r5-r7). This can be verified using
170 # webkit_unit_tests' WTF.Checked_int8_t test.
171 "-fno-tree-sra",
172 # The following option is disabled to improve binary
173 # size and performance in gcc 4.9.
174 "-fno-caller-saves",
175 ]
176 }
163 } 177 }
164 } 178 }
165 179
166 defines += [ "_FILE_OFFSET_BITS=64" ] 180 defines += [ "_FILE_OFFSET_BITS=64" ]
167 181
168 # Omit unwind support in official builds to save space. We can use breakpad 182 # Omit unwind support in official builds to save space. We can use breakpad
169 # for these builds. 183 # for these builds.
170 if (is_chrome_branded && is_official_build) { 184 if (is_chrome_branded && is_official_build) {
171 cflags += [ 185 cflags += [
172 "-fno-unwind-tables", 186 "-fno-unwind-tables",
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (is_android) { 263 if (is_android) {
250 cflags += [ 264 cflags += [
251 "-ffunction-sections", 265 "-ffunction-sections",
252 "-funwind-tables", 266 "-funwind-tables",
253 "-fno-short-enums", 267 "-fno-short-enums",
254 ] 268 ]
255 if (!is_clang) { 269 if (!is_clang) {
256 # Clang doesn't support these flags. 270 # Clang doesn't support these flags.
257 cflags += [ 271 cflags += [
258 "-finline-limit=64", 272 "-finline-limit=64",
259 # The following 6 options are disabled to save on
260 # binary size in gcc 4.8.
261 # TODO(fdegans) Reevaluate when we upgrade GCC.
262 "-fno-partial-inlining",
263 "-fno-early-inlining",
264 "-fno-tree-copy-prop",
265 "-fno-tree-loop-optimize",
266 "-fno-move-loop-invariants",
267 "-fno-caller-saves",
268 ] 273 ]
269 } 274 }
270 if (is_android_webview_build) { 275 if (is_android_webview_build) {
271 # Android predefines this as 1; undefine it here so Chromium can redefine 276 # Android predefines this as 1; undefine it here so Chromium can redefine
272 # it later to be 2 for chromium code and unset for third party code. This 277 # it later to be 2 for chromium code and unset for third party code. This
273 # works because cflags are added before defines. 278 # works because cflags are added before defines.
274 # TODO(brettw) the above comment seems incorrect. We specify defines 279 # TODO(brettw) the above comment seems incorrect. We specify defines
275 # before cflags on our compiler command lines. 280 # before cflags on our compiler command lines.
276 cflags += [ "-U_FORTIFY_SOURCE" ] 281 cflags += [ "-U_FORTIFY_SOURCE" ]
277 } 282 }
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 cflags += [ "-gsplit-dwarf" ] 915 cflags += [ "-gsplit-dwarf" ]
911 } 916 }
912 } 917 }
913 } 918 }
914 919
915 config("no_symbols") { 920 config("no_symbols") {
916 if (!is_win) { 921 if (!is_win) {
917 cflags = [ "-g0" ] 922 cflags = [ "-g0" ]
918 } 923 }
919 } 924 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698