From 06372a51fbbbea2d5ef597419fec0440c1580b90 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Thu, 18 Dec 2025 13:22:51 -0500 Subject: [PATCH] Simplify libyuv build files now that neon is required on arm No intended behavior change. Bug: 469092869 Change-Id: Iedaf1163bc0f8507174b571bad9a4a16be5e5777 --- BUILD.gn | 13 +++++-------- libyuv.gni | 4 +--- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 50e012f23..ab491242a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -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" ] } diff --git a/libyuv.gni b/libyuv.gni index 3334df70b..e3a3fc829 100644 --- a/libyuv.gni +++ b/libyuv.gni @@ -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