]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: Add support for SVE instructions in ISA-L on aarch64
authorJamie Pryde <jamiepry@uk.ibm.com>
Thu, 12 Mar 2026 15:05:26 +0000 (15:05 +0000)
committerJamie Pryde <jamiepry@uk.ibm.com>
Thu, 12 Mar 2026 15:05:26 +0000 (15:05 +0000)
ISA-L 2.31.0 introduced new EC functions that use SVE instructions on aarch64.
This means that the assembler must support SVE instructions
to build for aarch64. This commit passes `-Wa,-march=armv8-a+sve` to the ISA-L
configure step so the external assembler can process the new .S and .c files.

Signed-off-by: Jamie Pryde <jamiepry@uk.ibm.com>
cmake/modules/BuildISAL.cmake

index fa1476cabf8956c13bb0dbc99736415982b62801..5d9f48f773944b7db1693b1f61c32b984012ece5 100644 (file)
@@ -17,9 +17,19 @@ function(build_isal)
   # because it messes with the internal install paths of arrow's bundled deps
   set(NO_DESTDIR_COMMAND ${CMAKE_COMMAND} -E env --unset=DESTDIR)
 
+  set(arm_cflags "")
   if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND HAVE_ARMV8_SIMD)
-    list(APPEND configure_cmd CFLAGS=-no-integrated-as)
+    list(APPEND arm_cflags "-no-integrated-as")
   endif()
+  # isa-l 2.32.0 requires SVE assembly support
+  if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
+    list(APPEND arm_cflags "-Wa,-march=armv8-a+sve")
+  endif()
+  if(arm_cflags)
+    string(REPLACE ";" " " arm_cflags_str "${arm_cflags}")
+    list(APPEND configure_cmd "CFLAGS=${arm_cflags_string}")
+  endif()
+  
 
   include(ExternalProject)
   ExternalProject_Add(isal_ext