Simplify libyuv build files now that neon is required on arm

No intended behavior change.

Bug: 469092869
Change-Id: Iedaf1163bc0f8507174b571bad9a4a16be5e5777
This commit is contained in:
Nico Weber 2025-12-18 13:22:51 -05:00
parent deeb764bb9
commit 06372a51fb
2 changed files with 6 additions and 11 deletions

View File

@ -229,13 +229,12 @@ if (libyuv_use_neon) {
public_configs = [ ":libyuv_config" ]
# The -march arguments below are incompatible with libc++ modules.
use_libcxx_modules = false
if (current_cpu == "arm64") {
# The -march arguments below are incompatible with libc++ modules.
use_libcxx_modules = false
# TODO(thakis): Do we get this from global flags already? Is this needed?
cflags = [ "-march=armv8-a+dotprod+i8mm" ]
} else {
configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
cflags = [ "-mfpu=neon" ]
}
}
}
@ -395,9 +394,7 @@ if (libyuv_include_tests) {
# TODO(YangZhang): These lines can be removed when high accuracy
# YUV to RGB to Neon is ported.
if ((target_cpu == "armv7" || target_cpu == "armv7s" ||
(target_cpu == "arm" && arm_version >= 7) || target_cpu == "arm64") &&
(arm_use_neon || arm_optionally_use_neon)) {
if (target_cpu == "arm" || target_cpu == "arm64") {
defines += [ "LIBYUV_NEON" ]
}

View File

@ -15,9 +15,7 @@ declare_args() {
libyuv_include_tests = !build_with_chromium
libyuv_disable_jpeg = false
libyuv_disable_rvv = false
libyuv_use_neon =
current_cpu == "arm64" ||
(current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon))
libyuv_use_neon = current_cpu == "arm64" || current_cpu == "arm"
libyuv_use_sve = current_cpu == "arm64"
# Restrict to (is_linux || is_android) to work around undefined symbol linker