]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: build crypto_plugins only when needed for radosgw
authorKefu Chai <tchaikov@gmail.com>
Tue, 17 Jun 2025 07:55:27 +0000 (15:55 +0800)
committerKefu Chai <tchaikov@gmail.com>
Wed, 18 Jun 2025 03:26:32 +0000 (11:26 +0800)
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 <tchaikov@gmail.com>
src/CMakeLists.txt
src/crypto/CMakeLists.txt
src/os/CMakeLists.txt

index 3b6dfc473ded4a572b1ff24dbad02a8f945e72d6..8a92da63dd9fcc5c543c0c2fc6573fd750f38e1a 100644 (file)
@@ -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)
index d1ba381999f2b97aa7bcb87336f855abe82c665b..b85db7bb506a61b744fb5fd715344ca324651d72 100644 (file)
@@ -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)
index 9510797401319c8af47efc427fb66c3cdeb159ad..3934af5888b08c62301f8212f92883ea3b3bcc52 100644 (file)
@@ -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)