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 <mbonadei@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
This commit is contained in:
Ivan Pavlotskiy 2022-05-13 12:15:45 +03:00 committed by libyuv LUCI CQ
parent de71c67e53
commit 966768e899
2 changed files with 6 additions and 0 deletions

View File

@ -2,3 +2,5 @@
# Name or Organization <email address> # Name or Organization <email address>
Google Inc. Google Inc.
Ivan Pavlotskiy <ivan.pavlotskiy@lgepartner.com>

View File

@ -27,6 +27,10 @@ config("libyuv_config") {
if (is_android && current_cpu != "arm64") { if (is_android && current_cpu != "arm64") {
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ] 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. # This target is built when no specific target is specified on the command line.