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

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

Issue 218633007: Changed android toolchain to use GCC 4.8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Extra blank line Created 6 years, 7 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
« no previous file with comments | « build/config/arm.gni ('k') | build/config/gcc/gcc_version.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/gcc/gcc_version.gni")
5 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
6 if (cpu_arch == "arm") { 7 if (cpu_arch == "arm") {
7 import("//build/config/arm.gni") 8 import("//build/config/arm.gni")
8 } 9 }
9 10
10 declare_args() { 11 declare_args() {
11 # Normally, Android builds are lightly optimized, even for debug builds, to 12 # Normally, Android builds are lightly optimized, even for debug builds, to
12 # keep binary size down. Setting this flag to true disables such optimization 13 # keep binary size down. Setting this flag to true disables such optimization
13 android_full_debug = false 14 android_full_debug = false
14 } 15 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 210
210 # Android-specific flags setup. 211 # Android-specific flags setup.
211 # ----------------------------- 212 # -----------------------------
212 if (is_android) { 213 if (is_android) {
213 cflags += [ 214 cflags += [
214 "-ffunction-sections", 215 "-ffunction-sections",
215 "-funwind-tables", 216 "-funwind-tables",
216 "-fno-short-enums", 217 "-fno-short-enums",
217 ] 218 ]
218 if (!is_clang) { 219 if (!is_clang) {
219 # Clang doesn't support this one. 220 # Clang doesn't support these flags.
220 cflags += [ "-finline-limit=64" ] 221 cflags += [
222 "-finline-limit=64",
223 # The following 6 options are disabled to save on
224 # binary size in gcc 4.8.
225 # TODO(fdegans) Reevaluate when we upgrade GCC.
226 "-fno-partial-inlining",
227 "-fno-early-inlining",
228 "-fno-tree-copy-prop",
229 "-fno-tree-loop-optimize",
230 "-fno-move-loop-invariants",
231 "-fno-caller-saves",
232 ]
221 } 233 }
222 if (is_android_webview_build) { 234 if (is_android_webview_build) {
223 # Android predefines this as 1; undefine it here so Chromium can redefine 235 # Android predefines this as 1; undefine it here so Chromium can redefine
224 # it later to be 2 for chromium code and unset for third party code. This 236 # it later to be 2 for chromium code and unset for third party code. This
225 # works because cflags are added before defines. 237 # works because cflags are added before defines.
226 # TODO(brettw) the above comment seems incorrect. We specify defines 238 # TODO(brettw) the above comment seems incorrect. We specify defines
227 # before cflags on our compiler command lines. 239 # before cflags on our compiler command lines.
228 cflags += [ "-U_FORTIFY_SOURCE" ] 240 cflags += [ "-U_FORTIFY_SOURCE" ]
229 } 241 }
230 242
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 # Disabling c++0x-compat should be handled in WebKit, but 614 # Disabling c++0x-compat should be handled in WebKit, but
603 # this currently doesn't work because gcc_version is not set 615 # this currently doesn't work because gcc_version is not set
604 # correctly when building with the Android build system. 616 # correctly when building with the Android build system.
605 # TODO(torne): Fix this in WebKit. 617 # TODO(torne): Fix this in WebKit.
606 "-Wno-error=c++0x-compat", 618 "-Wno-error=c++0x-compat",
607 # Other things unrelated to -Wextra: 619 # Other things unrelated to -Wextra:
608 "-Wno-non-virtual-dtor", 620 "-Wno-non-virtual-dtor",
609 "-Wno-sign-promo", 621 "-Wno-sign-promo",
610 ] 622 ]
611 } 623 }
624
625 if (gcc_version >= 48) {
626 # Don't warn about the "typedef 'foo' locally defined but not used"
627 # for gcc 4.8.
628 # TODO: remove this flag once all builds work. See crbug.com/227506
629 cflags += [
630 "-Wno-unused-local-typedefs",
631 ]
632 }
612 } 633 }
613 } 634 }
614 635
615 # This will generate warnings when using Clang if code generates exit-time 636 # This will generate warnings when using Clang if code generates exit-time
616 # destructors, which will slow down closing the program. 637 # destructors, which will slow down closing the program.
617 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 638 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
618 config("wexit_time_destructors") { 639 config("wexit_time_destructors") {
619 if (is_clang) { 640 if (is_clang) {
620 cflags = [ "-Wexit-time-destructors" ] 641 cflags = [ "-Wexit-time-destructors" ]
621 } 642 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 } else { 765 } else {
745 cflags = [ "-g1" ] 766 cflags = [ "-g1" ]
746 } 767 }
747 } 768 }
748 769
749 config("no_symbols") { 770 config("no_symbols") {
750 if (!is_win) { 771 if (!is_win) {
751 cflags = [ "-g0" ] 772 cflags = [ "-g0" ]
752 } 773 }
753 } 774 }
754
OLDNEW
« no previous file with comments | « build/config/arm.gni ('k') | build/config/gcc/gcc_version.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698