From eba176f032c8a64285524f681214d0c00b004b4b Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Wed, 4 Aug 2021 12:10:41 -0700 Subject: [PATCH] build: Disable CPU-specific optimizations in libpng This fixes the Debug build of libpng on arm64 by avoiding CPU-specific optimizations that are not in our sources list. The Release build appears to have been unaffected, possibly due to link-time optimizations or dead code stripping. Change-Id: I900e00fe30b9f3748f2587cfea89a636b3a19811 --- packager/third_party/libpng/libpng.gyp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packager/third_party/libpng/libpng.gyp b/packager/third_party/libpng/libpng.gyp index 36571a515d..e9a4648498 100644 --- a/packager/third_party/libpng/libpng.gyp +++ b/packager/third_party/libpng/libpng.gyp @@ -33,6 +33,14 @@ 'dependencies': [ '../zlib/zlib.gyp:zlib', ], + # Disable all CPU-specific optimizations, which may fail to link because + # we don't have a CPU-specific set of source files. + 'defines': [ + 'PNG_ARM_NEON_OPT=0', + 'PNG_INTEL_SSE_OPT=0', + 'PNG_MIPS_MSA_OPT=0', + 'PNG_POWERPC_VSX_OPT=0', + ], 'direct_dependent_settings': { 'include_dirs': [ '.',