Reviewers: Jakob, Ben Murdoch,

Message:
Please take a look. Ben measured that this saves ~250K of binary size. Our perf
bots and local tests show no significant difference on performance.

We will revert it if this regresses chromium perf bots.

Description:
Use -O2 instead -O3 Android build.

It produces smaller binary with almost the same performance.

[email protected],[email protected]

Please review this at https://chromiumcodereview.appspot.com/15929009/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M build/android.gypi
  M build/common.gypi


Index: build/android.gypi
diff --git a/build/android.gypi b/build/android.gypi
index 8400ab113ab3c72cd7a3059577040526dfef5458..61fe8e7e7e09873b06f2c688cfa8ba480cd5f634 100644
--- a/build/android.gypi
+++ b/build/android.gypi
@@ -76,14 +76,14 @@
     'configurations': {
       'Release': {
         'cflags!': [
-          '-O2',
+          '-O3',
           '-Os',
         ],
         'cflags': [
           '-fdata-sections',
           '-ffunction-sections',
           '-fomit-frame-pointer',
-          '-O3',
+          '-O2',
         ],
       },  # Release
     },  # configurations
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 2e3c7854d528e9182980d02f14a98958517b3019..e6d8bfdd7698125b20e5b6120e518e4b96b0297c 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -451,8 +451,7 @@
           ['v8_enable_extra_checks==1', {
             'defines': ['ENABLE_EXTRA_CHECKS',],
           }],
-          ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \
-            or OS=="android"', {
+ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd", {
             'cflags!': [
               '-O2',
               '-Os',
@@ -471,6 +470,25 @@
               }],
             ],
           }],
+          ['OS=="android"', {
+            'cflags!': [
+              '-O3',
+              '-Os',
+            ],
+            'cflags': [
+              '-fdata-sections',
+              '-ffunction-sections',
+              '-O2',
+            ],
+            'conditions': [
+              [ 'gcc_version==44 and clang==0', {
+                'cflags': [
+                  # Avoid crashes with gcc 4.4 in the v8 test suite.
+                  '-fno-tree-vrp',
+                ],
+              }],
+            ],
+          }],
           ['OS=="mac"', {
             'xcode_settings': {
               'GCC_OPTIMIZATION_LEVEL': '3',  # -O3


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to