BUILD.gn: Disable libc++ modules for NEON and SVE

The -march arguments used for NEON and SVE builds in libyuv are
incompatible with libc++ modules. This change disables libc++ modules
for these build configurations to fix the build.

Bug: 425535758
Change-Id: I578a0d9929c10177903c567bc268407470b45034
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6695664
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
This commit is contained in:
Takuto Ikuta 2025-07-01 18:04:24 +09:00 committed by Frank Barchard
parent 007b920232
commit 96134e95a7

View File

@ -236,6 +236,8 @@ 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") {
cflags = [ "-march=armv8-a+dotprod+i8mm" ]
} else {
@ -253,6 +255,8 @@ if (libyuv_use_sve) {
public_configs = [ ":libyuv_config" ]
# The -march arguments below are incompatible with libc++ modules.
use_libcxx_modules = false
# SVE2 is an Armv9-A feature.
cflags = [ "-march=armv9-a+i8mm+sve2" ]
}
@ -270,6 +274,8 @@ if (libyuv_use_sme) {
public_configs = [ ":libyuv_config" ]
# The -march arguments below are incompatible with libc++ modules.
use_libcxx_modules = false
# SME is an Armv9-A feature.
cflags = [ "-march=armv9-a+i8mm+sme" ]
}