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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index b04d6dfe35279fd527035de16bc5e1552b7cd0ea..59c467303cce056c4b2a5b6b8f83d7a2949e44f7 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -160,6 +160,20 @@ config("compiler") {
cflags += [ "-mthumb-interwork" ]
}
}
+ if (!is_clang) {
+ # Clang doesn't support these flags.
+ cflags += [
+ # The tree-sra optimization (scalar replacement for
+ # aggregates enabling subsequent optimizations) leads to
+ # invalid code generation when using the Android NDK's
+ # compiler (r5-r7). This can be verified using
+ # webkit_unit_tests' WTF.Checked_int8_t test.
+ "-fno-tree-sra",
+ # The following option is disabled to improve binary
+ # size and performance in gcc 4.9.
+ "-fno-caller-saves",
+ ]
+ }
}
}
@@ -256,15 +270,6 @@ config("compiler") {
# 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) {

Powered by Google App Engine
This is Rietveld 408576698