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 346697 9344b69e9e324a3e8dff1bb2f734aa5dca8cc405
parent 346696 df6e1dfde6e3778d34580182c9537bbfa09db550
child 346698 e0593340378ddae4df377b88fc26039b17df9b95
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1284803
milestone50.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 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)',
           ],
         }],