Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 0eddb2ce95b07aa5719e095abefebdc4e3598123..fc4478a3146efde82f9d979526ee1fdf40807e30 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -146,6 +146,21 @@ 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. |
+ # TODO(fdegans) Reevaluate when we upgrade GCC. |
pasko
2014/07/28 13:14:30
Repeating yourself is boring. Let's have only one
Fabrice (no longer in Chrome)
2014/07/28 13:40:43
I removed the TODO (as per previous comment).
AFAI
brettw
2014/07/28 17:56:14
Yes, please duplicate the comment.
pasko
2014/07/28 18:22:27
I was wrong: I thought this section is only about
|
+ "-fno-caller-saves", |
+ ] |
+ } |
} |
} |
@@ -239,15 +254,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) { |