Skip to content

Commit e663ede

Browse files
committed
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: - dbbf052: Added crypto plugins with ceph_crypto_isal as os dependency - 53726b8: 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 <[email protected]>
1 parent ba6e10a commit e663ede

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,6 @@ if(WITH_TESTS)
873873
add_subdirectory(test)
874874
endif()
875875

876-
add_subdirectory(crypto)
877-
878876
if(WITH_TESTS)
879877
install(PROGRAMS
880878
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-debugpack
@@ -1147,6 +1145,7 @@ if(WITH_RADOSGW)
11471145
endif(WITH_SYSTEM_ARROW)
11481146
endif(WITH_RADOSGW_SELECT_PARQUET OR WITH_RADOSGW_ARROW_FLIGHT)
11491147

1148+
add_subdirectory(crypto)
11501149
add_subdirectory(libkmip)
11511150
add_subdirectory(rgw)
11521151
endif(WITH_RADOSGW)

src/crypto/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
add_custom_target(crypto_plugins)
1+
# crypto plugins are loaded at runtime by rgw_crypt.cc
2+
add_custom_target(crypto_plugins ALL)
23
set(crypto_plugin_dir ${CEPH_INSTALL_PKGLIBDIR}/crypto)
34

45
add_subdirectory(openssl)

src/os/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ if(WITH_JAEGER)
4141
PRIVATE jaeger_base)
4242
endif()
4343

44-
add_dependencies(os crypto_plugins)
45-
4644
if(WITH_BLUESTORE)
4745
add_executable(ceph-bluestore-tool
4846
bluestore/bluestore_tool.cc)

0 commit comments

Comments
 (0)