Bug 880419: make sure that NEON detection is on for B2G libyuv; build on Android ARMv6 r=glandium
authorRandell Jesup <rjesup@jesup.org>
Tue, 04 Feb 2014 16:08:43 -0500
changeset 166824 0930352a2b0e04285d5d876566ce34e419152e74
parent 166823 f9315e1a38447e5f62ed9ff64470397252fcbc1f
child 166825 326a283714a8330ac1749c8cacafe857f1da2e02
push id39295
push userrjesup@wgate.com
push dateTue, 04 Feb 2014 21:09:53 +0000
treeherdermozilla-inbound@326a283714a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs880419
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 880419: make sure that NEON detection is on for B2G libyuv; build on Android ARMv6 r=glandium (This works around the fact that we define HAVE_ARM_NEON on ARMv6 processors)
build/gyp.mozbuild
media/libyuv/libyuv.gyp
media/libyuv/moz.build
media/webrtc/signaling/test/Makefile.in
--- a/build/gyp.mozbuild
+++ b/build/gyp.mozbuild
@@ -25,16 +25,17 @@ gyp_vars = {
     'build_libyuv': 0,
     'libyuv_dir': '/media/libyuv',
 
     # saves 4MB when webrtc_trace is off
     'enable_lazy_trace_alloc': 1,
 
      # turn off mandatory use of NEON and instead use NEON detection
     'arm_neon': 0,
+    'arm_neon_optional': 1,
 
     'moz_widget_toolkit_gonk': 0,
 
     # (for vp8) chromium sets to 0 also
     'use_temporal_layers': 0,
     # Creates AEC internal sample dump files in current directory
     # 'aec_debug_dump': 1,
 
@@ -87,16 +88,17 @@ arches = {
     'ia64': 'ia64',
 }
 
 gyp_vars['target_arch'] = arches[CONFIG['CPU_ARCH']]
 
 if CONFIG['ARM_ARCH']:
     if int(CONFIG['ARM_ARCH']) < 7:
         gyp_vars['armv7'] = 0
+        gyp_vars['arm_neon_optional'] = 0
     elif os == 'Android':
         gyp_vars['armv7'] = 1
     else:
         # CPU detection for ARM works on Android only.  armv7 always uses CPU
         # detection, so we have to set armv7=0 for non-Android target
         gyp_vars['armv7'] = 0
     # For libyuv
     gyp_vars['arm_version'] = CONFIG['ARM_ARCH']
--- a/media/libyuv/libyuv.gyp
+++ b/media/libyuv/libyuv.gyp
@@ -33,19 +33,28 @@
           ],
           # TODO(noahric): This should remove whatever mfpu is set, not
           # just vfpv3-d16.
           'cflags!': [
             '-mfpu=vfp',
             '-mfpu=vfpv3',
             '-mfpu=vfpv3-d16',
           ],
+          # XXX Doesn't work currently
+          'cflags_mozilla!': [
+            '-mfpu=vfp',
+            '-mfpu=vfpv3',
+            '-mfpu=vfpv3-d16',
+          ],
           'cflags': [
             '-mfpu=neon',
           ],
+          'cflags_mozilla': [
+            '-mfpu=neon',
+          ],
           'include_dirs': [
             'include',
             '.',
           ],
           'direct_dependent_settings': {
             'include_dirs': [
               'include',
               '.',
--- a/media/libyuv/moz.build
+++ b/media/libyuv/moz.build
@@ -14,9 +14,8 @@ libyuv_non_unified_sources = [
     'source/row_common.cc',
     'source/scale.cc',
     'source/scale_common.cc',
 ]
 GYP_DIRS['.'].input = 'libyuv.gyp'
 GYP_DIRS['.'].variables = gyp_vars
 GYP_DIRS['.'].sandbox_vars['FINAL_LIBRARY'] = 'xul'
 GYP_DIRS['.'].non_unified_sources += libyuv_non_unified_sources
-
--- a/media/webrtc/signaling/test/Makefile.in
+++ b/media/webrtc/signaling/test/Makefile.in
@@ -13,16 +13,20 @@ LIBS = \
   $(DEPTH)/media/webrtc/signalingtest/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \
   $(DEPTH)/layout/media/webrtc/$(LIB_PREFIX)webrtc.$(LIB_SUFFIX) \
   $(DEPTH)/layout/media/$(LIB_PREFIX)gkmedias.$(LIB_SUFFIX) \
   $(DEPTH)/media/webrtc/trunk/testing/gtest_gtest/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) \
   $(DEPTH)/media/libyuv/libyuv_libyuv/$(LIB_PREFIX)yuv.$(LIB_SUFFIX) \
   $(DEPTH)/netwerk/srtp/src/$(LIB_PREFIX)nksrtp_s.$(LIB_SUFFIX) \
   $(NULL)
 
+ifdef BUILD_ARM_NEON
+LIBS += $(DEPTH)/media/libyuv/libyuv_libyuv_neon/$(LIB_PREFIX)yuv_neon.$(LIB_SUFFIX)
+endif
+
 ifdef JS_SHARED_LIBRARY
 LIBS += $(MOZ_JS_LIBS)
 endif
 
 ifdef MOZ_ALSA
 LIBS += \
   $(MOZ_ALSA_LIBS) \
   $(NULL)