Skip to content

Commit

Permalink
cmake: move rgw_lua_request.cc from rgw_common target to rgw_a
Browse files Browse the repository at this point in the history
resolves a clang linker error where `rgw::lua::request::RequestLog()`
from rgw_lua_request.cc (in rgw_common) looks for `rgw_log_op()` from
rgw_log.cc (in rgw_a)

rgw_a depends on rgw_common, not the other way around. so this moves
rgw_lua_request.cc into the same target as rgw_log.cc

lua is now a public dependency of rgw_common so it's not hidden from
rgw_a or unit tests

Signed-off-by: Casey Bodley <[email protected]>
  • Loading branch information
cbodley committed Apr 8, 2022
1 parent fbdc2a1 commit 25393f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions src/rgw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ set(librgw_common_srcs
cls_fifo_legacy.cc
rgw_lua_utils.cc
rgw_lua.cc
rgw_lua_request.cc
rgw_bucket_encryption.cc
rgw_tracer.cc)

Expand Down Expand Up @@ -214,14 +213,14 @@ target_link_libraries(rgw_common
dmclock::dmclock
${CURL_LIBRARIES}
${EXPAT_LIBRARIES}
${LUA_LIBRARIES}
${ARROW_LIBRARIES}
PUBLIC
${LUA_LIBRARIES}
spawn)
target_include_directories(rgw_common
PUBLIC "services"
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw"
PRIVATE "${LUA_INCLUDE_DIR}")
PUBLIC "${LUA_INCLUDE_DIR}")
if(WITH_RADOSGW_KAFKA_ENDPOINT)
# used by rgw_kafka.cc
target_link_libraries(rgw_common
Expand Down Expand Up @@ -275,6 +274,7 @@ set(rgw_a_srcs
rgw_http_client_curl.cc
rgw_loadgen.cc
rgw_log.cc
rgw_lua_request.cc
rgw_period_pusher.cc
rgw_realm_reloader.cc
rgw_realm_watcher.cc
Expand Down Expand Up @@ -322,7 +322,6 @@ target_link_libraries(rgw_a
PRIVATE
common_utf8 global
${CRYPTO_LIBS}
${LUA_LIBRARIES}
${ARROW_LIBRARIES}
OATH::OATH
PUBLIC
Expand All @@ -336,8 +335,6 @@ endif()

set(rgw_libs rgw_a)

list(APPEND rgw_libs ${LUA_LIBRARIES})

set(rgw_schedulers_srcs
rgw_dmclock_scheduler_ctx.cc
rgw_dmclock_sync_scheduler.cc
Expand Down Expand Up @@ -463,8 +460,6 @@ if(WITH_RADOSGW_KAFKA_ENDPOINT)
target_link_libraries(rgw PRIVATE RDKafka::RDKafka)
endif()

target_link_libraries(rgw PRIVATE ${LUA_LIBRARIES})

set_target_properties(rgw PROPERTIES OUTPUT_NAME rgw VERSION 2.0.0
SOVERSION 2)
install(TARGETS rgw DESTINATION ${CMAKE_INSTALL_LIBDIR})
Expand Down
2 changes: 1 addition & 1 deletion src/test/rgw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,5 @@ target_link_libraries(unittest_log_backing radostest-cxx ${UNITTEST_LIBS}

add_executable(unittest_rgw_lua test_rgw_lua.cc)
add_ceph_unittest(unittest_rgw_lua)
target_link_libraries(unittest_rgw_lua ${rgw_libs} ${LUA_LIBRARIES})
target_link_libraries(unittest_rgw_lua ${rgw_libs})

0 comments on commit 25393f6

Please sign in to comment.