From 1724c4be72f32d2f04eead939f7b3f35ad4e39e3 Mon Sep 17 00:00:00 2001 From: George Steed Date: Fri, 13 Jun 2025 09:06:02 +0100 Subject: [PATCH] [AArch64] Add missing "+i8mm" feature when building SME FEAT_I8MM is not unconditionally enabled with -march=armv9-a since it only becomes mandatory from Armv9.1-A, so explicitly specify it in both BUILD.gn and CMakeLists.txt. Also flip the order of +sve2+i8mm => +i8mm+sve2 to match occurrences elsewhere. Change-Id: I8c37580d3718f380b772cdb726d8c30bcd5b9e2c Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6656718 Reviewed-by: Frank Barchard --- BUILD.gn | 4 ++-- CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index aef66ce9a..c684e587d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -254,7 +254,7 @@ if (libyuv_use_sve) { public_configs = [ ":libyuv_config" ] # SVE2 is an Armv9-A feature. - cflags = [ "-march=armv9-a+sve2+i8mm" ] + cflags = [ "-march=armv9-a+i8mm+sve2" ] } } @@ -271,7 +271,7 @@ if (libyuv_use_sme) { public_configs = [ ":libyuv_config" ] # SME is an Armv9-A feature. - cflags = [ "-march=armv9-a+sme" ] + cflags = [ "-march=armv9-a+i8mm+sme" ] } } diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aa1549b3..c6cce8a60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,7 @@ if(NOT MSVC) set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) set(OLD_CMAKE_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE}) - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -march=armv9-a+sme") + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -march=armv9-a+i8mm+sme") set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) # Check whether the compiler can compile SME functions; this fails # with Clang for Windows. @@ -140,7 +140,7 @@ int main(void) { return 0; } ${ly_src_dir}/rotate_sme.cc ${ly_src_dir}/row_sme.cc ${ly_src_dir}/scale_sme.cc) - target_compile_options(${ly_lib_name}_sme PRIVATE -march=armv9-a+sme) + target_compile_options(${ly_lib_name}_sme PRIVATE -march=armv9-a+i8mm+sme) list(APPEND ly_lib_parts $) else() add_definitions(-DLIBYUV_DISABLE_SME)