Bug 1494503 - disable neon codepaths in libyuv for aarch64 windows; r=jesup
authorNathan Froyd <froydnj@mozilla.com>
Thu, 27 Sep 2018 14:33:26 -0400
changeset 497032 bec13236b95d8213552cd9479a10d0d1315dd89c
parent 497031 78d60776b5be58408a15de4346b302d1df1f8c14
child 497033 9552949ae7cdec2f6d4cb6be152cc86be993ecf6
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1494503
milestone64.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 1494503 - disable neon codepaths in libyuv for aarch64 windows; r=jesup The NEON codepaths could work, but they'd have to be converted to MSVC-friendly assembly (or separate .asm files) first. Just disable building them for now.
media/libyuv/aarch64-windows-noneon.patch
media/libyuv/libyuv/libyuv.gyp
media/libyuv/update.py
new file mode 100644
--- /dev/null
+++ b/media/libyuv/aarch64-windows-noneon.patch
@@ -0,0 +1,14 @@
+diff --git a/media/libyuv/libyuv/libyuv.gyp b/media/libyuv/libyuv/libyuv.gyp
+index 776510b..51ab531 100644
+--- a/media/libyuv/libyuv/libyuv.gyp
++++ b/media/libyuv/libyuv/libyuv.gyp
+@@ -33,7 +33,8 @@
+     'build_msa': 0,
+     'conditions': [
+        ['(target_arch == "armv7" or target_arch == "armv7s" or \
+-       (target_arch == "arm" and arm_version >= 7) or target_arch == "arm64")\
++       (target_arch == "arm" and arm_version >= 7) or \
++       (OS != "win" and target_arch == "arm64")) \
+        and (arm_neon == 1 or arm_neon_optional == 1)', {
+          'build_neon': 1,
+        }],
--- a/media/libyuv/libyuv/libyuv.gyp
+++ b/media/libyuv/libyuv/libyuv.gyp
@@ -28,17 +28,18 @@
     'use_lto%': 0,
     'yuv_disable_asm%': 0,
     'yuv_disable_avx2%': 0,
     'mips_msa%': 0,  # Default to msa off.
     'build_neon': 0,
     'build_msa': 0,
     'conditions': [
        ['(target_arch == "armv7" or target_arch == "armv7s" or \
-       (target_arch == "arm" and arm_version >= 7) or target_arch == "arm64")\
+       (target_arch == "arm" and arm_version >= 7) or \
+       (OS != "win" and target_arch == "arm64")) \
        and (arm_neon == 1 or arm_neon_optional == 1)', {
          'build_neon': 1,
        }],
        ['(target_arch == "mipsel" or target_arch == "mips64el")\
        and (mips_msa == 1)',
        {
          'build_msa': 1,
        }],
old mode 100644
new mode 100755
--- a/media/libyuv/update.py
+++ b/media/libyuv/update.py
@@ -41,16 +41,18 @@ def apply_patches():
     # Patch to fix build errors
     os.system("patch -p3 < fix_build_errors.patch")
     # Patch to make mjpeg printfs optional at build time
     os.system("patch -p3 < make_mjpeg_printfs_optional.patch")
     # Patch to allow disabling of inline ASM and AVX2 code
     os.system("patch -p3 < allow_disabling_asm_avx2.patch")
     # Patch to add H444ToARGB() variant
     os.system("patch -p3 < add_H444ToARGB.patch")
+    # Patch to avoid selecting neon codepaths on AArch64 Windows
+    os.system("patch -p3 < aarch64-windows-noneon.patch")
 
 def update_readme(commit, commitdate):
     with open('README_MOZILLA') as f:
         readme = f.read()
 
     if 'The git commit ID last used to import was ' in readme:
         new_readme = re.sub('The git commit ID last used to import was [v\.a-f0-9]+ \(.+\)',
             'The git commit ID last used to import was %s (%s)' % (commit, commitdate), readme)