Bug 1284803 part 7 - Disable assembly if toolchain doesn't support ssse3/sse4.1 r=jesup
authorSotaro Ikeda <sotaro.ikeda.g@gmail.com>
Tue, 26 Jul 2016 00:00:55 -0700
changeset 331731 9344b69e9e324a3e8dff1bb2f734aa5dca8cc405
parent 331730 df6e1dfde6e3778d34580182c9537bbfa09db550
child 331732 e0593340378ddae4df377b88fc26039b17df9b95
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1284803
milestone50.0a1
Bug 1284803 part 7 - Disable assembly if toolchain doesn't support ssse3/sse4.1 r=jesup
media/libyuv/libyuv.gyp
--- a/media/libyuv/libyuv.gyp
+++ b/media/libyuv/libyuv.gyp
@@ -20,16 +20,17 @@
     'use_system_libjpeg%': 0,
     'libyuv_disable_jpeg%': 0,
     # 'chromium_code' treats libyuv as internal and increases warning level.
     'chromium_code': 1,
     # clang compiler default variable usable by other apps that include libyuv.
     'clang%': 0,
     # Link-Time Optimizations.
     'use_lto%': 0,
+    'yuv_disable_asm%': 0,
     'build_neon': 0,
     'conditions': [
        ['(target_arch == "armv7" or target_arch == "armv7s" or \
        (target_arch == "arm" and arm_version >= 7) or target_arch == "arm64")\
        and (arm_neon == 1 or arm_neon_optional == 1)',
        {
          'build_neon': 1,
        }],
@@ -75,16 +76,24 @@
             ['target_arch != "arm64"', {
               'cflags': [
                 '-mfpu=neon',
                 # '-marm',  # arm32 not thumb
               ],
             }],
           ],
         }],
+        [ 'yuv_disable_asm != 0', {
+          'defines': [
+            # Enable the following 3 macros to turn off assembly for specified CPU.
+            'LIBYUV_DISABLE_X86',
+            'LIBYUV_DISABLE_NEON',
+            'LIBYUV_DISABLE_MIPS',
+          ],
+        }],
         ['build_with_mozilla == 1', {
           'defines': [
             'HAVE_JPEG'
           ],
           'cflags_mozilla': [
             '$(MOZ_JPEG_CFLAGS)',
           ],
         }],