From cecce28f16b0867ea8578a8f0c1478e24a40e525 Mon Sep 17 00:00:00 2001 From: Alex Ainscow Date: Wed, 18 Mar 2026 14:51:57 +0000 Subject: [PATCH] src: Move the decision to build the ISA plugin to the top level make file Previously, the first time you build ceph, common did not see the correct value of WITH_EC_ISA_PLUGIN. The consequence is that the global.yaml gets build with osd_erasure_code_plugins not including isa. This is not great given its our default plugin. We considered simply removing this parameter from make entirely, but this may require more discussion about supporting old hardware. So the slightly ugly fix is to move this erasure-code specific declartion to the top-level. Fixes: https://tracker.ceph.com/issues/75537 Signed-off-by: Alex Ainscow --- src/CMakeLists.txt | 6 ++++++ src/erasure-code/CMakeLists.txt | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index acdcea4464f..c99894cf93b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -242,6 +242,12 @@ if(HAVE_INTEL) endif() endif() +# Set WITH_EC_ISA_PLUGIN early so it's available when processing common/options +# This must be set before add_subdirectory(common) is called +if(HAVE_NASM_X64_AVX2 OR HAVE_ARMV8_SIMD OR HAS_ALTIVEC) + set(WITH_EC_ISA_PLUGIN TRUE CACHE BOOL "") +endif() + # require c++23 set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/src/erasure-code/CMakeLists.txt b/src/erasure-code/CMakeLists.txt index 8d170d14dc5..cc5a84e9dc1 100644 --- a/src/erasure-code/CMakeLists.txt +++ b/src/erasure-code/CMakeLists.txt @@ -23,10 +23,6 @@ add_subdirectory(shec) add_subdirectory(clay) add_subdirectory(consistency) -if(HAVE_NASM_X64_AVX2 OR HAVE_ARMV8_SIMD OR HAS_ALTIVEC) - set(WITH_EC_ISA_PLUGIN TRUE CACHE BOOL "") -endif() - if(WITH_EC_ISA_PLUGIN) add_subdirectory(isa) set(EC_ISA_LIB ec_isa) -- 2.47.3