# HG changeset patch # User Nathan Froyd # Date 1538073206 14400 # Node ID bec13236b95d8213552cd9479a10d0d1315dd89c # Parent de8fd26b482f3a2565378eaded07e74eeccedccb 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. diff --git a/media/libyuv/aarch64-windows-noneon.patch b/media/libyuv/aarch64-windows-noneon.patch 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, + }], diff --git a/media/libyuv/libyuv/libyuv.gyp b/media/libyuv/libyuv/libyuv.gyp --- 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, }], diff --git a/media/libyuv/update.py b/media/libyuv/update.py 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)