Revision: 8042
Author:   [email protected]
Date:     Tue May 24 07:49:02 2011
Log:      Platform and build updates for Android build

[email protected]

BUG=none
TEST=none

Review URL: http://codereview.chromium.org//7059015
http://code.google.com/p/v8/source/detail?r=8042

Modified:
 /branches/bleeding_edge/tools/gyp/v8.gyp

=======================================
--- /branches/bleeding_edge/tools/gyp/v8.gyp    Tue May 24 06:02:01 2011
+++ /branches/bleeding_edge/tools/gyp/v8.gyp    Tue May 24 07:49:02 2011
@@ -55,6 +55,7 @@
     'v8_use_arm_eabi_hardfloat%': 'false',

     'v8_use_snapshot%': 'true',
+    'host_os%': '<(OS)',
     'v8_use_liveobjectlist%': 'false',
   },
   'conditions': [
@@ -327,7 +328,47 @@
               'outputs': [
                 '<(INTERMEDIATE_DIR)/snapshot.cc',
               ],
-              'action': ['<@(_inputs)', '<@(_outputs)'],
+              'variables': {
+                'mksnapshot_flags': [],
+              },
+              'conditions': [
+                ['v8_target_arch=="arm"', {
+ # The following rules should be consistent with chromium's + # common.gypi and V8's runtime rule to ensure they all generate + # the same correct machine code. The following issue is about
+                  # V8's runtime rule about vfpv3 and neon:
+                  # http://code.google.com/p/v8/issues/detail?id=914
+                  'conditions': [
+                    ['armv7==1', {
+ # The ARM Architecture Manual mandates VFPv3 if NEON is
+                      # available.
+ # The current V8 doesn't use d16-d31, so for vfpv3-d16, we can
+                      # also enable vfp3 for the better performance.
+                      'conditions': [
+ ['arm_neon!=1 and arm_fpu!="vfpv3" and arm_fpu!="vfpv3-d16"', {
+                          'variables': {
+                            'mksnapshot_flags': [
+                              '--noenable_vfp3',
+                            ],
+                          },
+                        }],
+                      ],
+                    },{ # else: armv7!=1
+                      'variables': {
+                        'mksnapshot_flags': [
+                          '--noenable_armv7',
+                          '--noenable_vfp3',
+                        ],
+                      },
+                    }],
+                  ],
+                }],
+              ],
+              'action': [
+                '<@(_inputs)',
+                '<@(mksnapshot_flags)',
+                '<@(_outputs)'
+              ],
             },
           ],
         },
@@ -749,6 +790,30 @@
                   '../../src/platform-posix.cc'
                 ],
               }
+            ],
+            ['OS=="android"', {
+                'sources': [
+                  '../../src/platform-posix.cc',
+                ],
+                'conditions': [
+                  ['host_os=="mac" and _toolset!="target"', {
+                    'sources': [
+                      '../../src/platform-macos.cc'
+                    ]
+                  }, {
+                    'sources': [
+                      '../../src/platform-linux.cc'
+                    ]
+                  }],
+                  ['_toolset=="target"', {
+                    'link_settings': {
+                      'libraries': [
+                        '-llog',
+                       ],
+                     }
+                  }],
+                ],
+              },
             ],
             ['OS=="freebsd"', {
                 'link_settings': {

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to