From 966768e899c0eb932e1cd72935d37e15284daec0 Mon Sep 17 00:00:00 2001 From: Ivan Pavlotskiy Date: Fri, 13 May 2022 12:15:45 +0300 Subject: [PATCH] Fix compile errors for ARM targets when libyuv_use_neon = false When building for ARM target with "libyuv_use_neon" set to false, the build fails because there are still codes that reference to the NEON related functions. To disable these code parts completely, the LIBYUV_DISABLE_NEON macro should be defined when the "libyuv_use_neon" is set to false. Bug: libyuv:929 Change-Id: I8f34288d0d17dd29b85db004e62d83e4ace3d595 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3628112 Reviewed-by: Mirko Bonadei Commit-Queue: Mirko Bonadei --- AUTHORS | 2 ++ BUILD.gn | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/AUTHORS b/AUTHORS index 9686ac13e..28c08956a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,3 +2,5 @@ # Name or Organization Google Inc. + +Ivan Pavlotskiy diff --git a/BUILD.gn b/BUILD.gn index 2c9c3e6e4..a72ff0655 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -27,6 +27,10 @@ config("libyuv_config") { if (is_android && current_cpu != "arm64") { ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ] } + + if (!libyuv_use_neon) { + defines = [ "LIBYUV_DISABLE_NEON" ] + } } # This target is built when no specific target is specified on the command line.