From: Kefu Chai Date: Tue, 17 Jun 2025 07:55:27 +0000 (+0800) Subject: cmake: build crypto_plugins only when needed for radosgw X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e663ede232a82f2b5af31d39d469f59bc72cfd0b;p=ceph.git cmake: build crypto_plugins only when needed for radosgw Make crypto_plugins a conditional ALL target instead of an explicit dependency to improve build parallelism. Background: - dbbf052f: Added crypto plugins with ceph_crypto_isal as os dependency - 53726b8e: Changed os to depend on crypto_plugins (not specific plugin) - Issue: * crypto_plugins are not dependencys of "os" at all * crypto_plugins are runtime-only dependencies for rgw_common In this change: - Remove crypto_plugins from explicit target dependencies - Add crypto_plugins to ALL target when WITH_RADOSGW=ON - Plugins now build in parallel with other targets - Maintains runtime plugin loading without compile-time coupling This improves build concurrency by allowing crypto_plugins to build in parallel with os/rgw_common instead of sequentially, and prevents building crypto plugins when RadosGW is disabled. Signed-off-by: Kefu Chai --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3b6dfc473ded..8a92da63dd9f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -873,8 +873,6 @@ if(WITH_TESTS) add_subdirectory(test) endif() -add_subdirectory(crypto) - if(WITH_TESTS) install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-debugpack @@ -1147,6 +1145,7 @@ if(WITH_RADOSGW) endif(WITH_SYSTEM_ARROW) endif(WITH_RADOSGW_SELECT_PARQUET OR WITH_RADOSGW_ARROW_FLIGHT) + add_subdirectory(crypto) add_subdirectory(libkmip) add_subdirectory(rgw) endif(WITH_RADOSGW) diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt index d1ba381999f2..b85db7bb506a 100644 --- a/src/crypto/CMakeLists.txt +++ b/src/crypto/CMakeLists.txt @@ -1,4 +1,5 @@ -add_custom_target(crypto_plugins) +# crypto plugins are loaded at runtime by rgw_crypt.cc +add_custom_target(crypto_plugins ALL) set(crypto_plugin_dir ${CEPH_INSTALL_PKGLIBDIR}/crypto) add_subdirectory(openssl) diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt index 951079740131..3934af5888b0 100644 --- a/src/os/CMakeLists.txt +++ b/src/os/CMakeLists.txt @@ -41,8 +41,6 @@ if(WITH_JAEGER) PRIVATE jaeger_base) endif() -add_dependencies(os crypto_plugins) - if(WITH_BLUESTORE) add_executable(ceph-bluestore-tool bluestore/bluestore_tool.cc)