Skip to content

Commit

Permalink
Merge pull request #10220 from dotnwat/shared-lib
Browse files Browse the repository at this point in the history
Support shared library build of Redpanda
  • Loading branch information
dotnwat authored Apr 20, 2023
2 parents 6bacf87 + a18c1fb commit 56004dd
Show file tree
Hide file tree
Showing 23 changed files with 34 additions and 47 deletions.
26 changes: 0 additions & 26 deletions src/v/archival/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1 @@

v_cc_library(
NAME archival
SRCS
archival_policy.cc
ntp_archiver_service.cc
probe.cc
types.cc
upload_controller.cc
segment_reupload.cc
retention_calculator.cc
upload_housekeeping_service.cc
adjacent_segment_merger.cc
DEPS
Seastar::seastar
v::bytes
v::http
v::cloud_storage_clients
v::cloud_storage
v::json
v::model
v::storage
v::cluster
v::config
v::rphashing
)
add_subdirectory(tests)
4 changes: 2 additions & 2 deletions src/v/archival/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
v::seastar_testing_main
v::application
Boost::unit_test_framework
v::archival
v::cluster
v::storage_test_utils
v::cloud_roles
v::http_test_utils
Expand All @@ -35,7 +35,7 @@ else()
LIBRARIES
v::seastar_testing_main
Boost::unit_test_framework
v::archival
v::cluster
ARGS "-- -c 1"
LABELS archival
)
Expand Down
2 changes: 0 additions & 2 deletions src/v/cloud_storage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ v_cc_library(
offset_translation_layer.cc
probe.cc
partition_probe.cc
partition_recovery_manager.cc
types.cc
remote_segment.cc
remote_partition.cc
Expand All @@ -22,7 +21,6 @@ v_cc_library(
segment_state.cc
recovery_errors.cc
recovery_request.cc
topic_recovery_service.cc
recovery_utils.cc
segment_meta_cstore.cc
DEPS
Expand Down
2 changes: 1 addition & 1 deletion src/v/cloud_storage/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ rp_test(
BENCHMARK_TEST
BINARY_NAME cloud_storage
SOURCES cache_bench.cc segment_meta_cstore_bench.cc
LIBRARIES Seastar::seastar_perf_testing v::cloud_storage
LIBRARIES Seastar::seastar_perf_testing v::cloud_storage v::storage
LABELS cloud_storage
)
2 changes: 1 addition & 1 deletion src/v/cloud_storage/tests/topic_recovery_service_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

#include "cloud_storage/tests/s3_imposter.h"
#include "cloud_storage/topic_recovery_service.h"
#include "cluster/topic_recovery_service.h"
#include "redpanda/tests/fixture.h"
#include "test_utils/fixture.h"

Expand Down
12 changes: 11 additions & 1 deletion src/v/cluster/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,17 @@ v_cc_library(
topic_recovery_status_types.cc
topic_table_partition_generator.cc
cloud_storage_size_reducer.cc
topic_recovery_service.cc
partition_recovery_manager.cc
../archival/archival_policy.cc
../archival/ntp_archiver_service.cc
../archival/probe.cc
../archival/types.cc
../archival/upload_controller.cc
../archival/segment_reupload.cc
../archival/retention_calculator.cc
../archival/upload_housekeeping_service.cc
../archival/adjacent_segment_merger.cc
DEPS
Seastar::seastar
bootstrap_rpc
Expand All @@ -177,7 +188,6 @@ v_cc_library(
absl::flat_hash_map
v::model
v::cloud_storage
v::archival
v::features
)
add_subdirectory(tests)
Expand Down
2 changes: 1 addition & 1 deletion src/v/cluster/partition_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#include "archival/types.h"
#include "cloud_storage/cache_service.h"
#include "cloud_storage/partition_manifest.h"
#include "cloud_storage/partition_recovery_manager.h"
#include "cloud_storage/remote.h"
#include "cluster/archival_metadata_stm.h"
#include "cluster/fwd.h"
#include "cluster/logger.h"
#include "cluster/partition_recovery_manager.h"
#include "cluster/types.h"
#include "config/configuration.h"
#include "model/metadata.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* https://github.com/redpanda-data/redpanda/blob/master/licenses/rcl.md
*/

#include "cloud_storage/partition_recovery_manager.h"
#include "cluster/partition_recovery_manager.h"

#include "bytes/iobuf_istreambuf.h"
#include "cloud_storage/logger.h"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* https://github.com/redpanda-data/redpanda/blob/master/licenses/rcl.md
*/

#include "cloud_storage/topic_recovery_service.h"
#include "cluster/topic_recovery_service.h"

#include "cloud_storage/logger.h"
#include "cloud_storage/recovery_utils.h"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/v/cluster/topic_recovery_status_frontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

#include "cluster/topic_recovery_status_frontend.h"

#include "cloud_storage/topic_recovery_service.h"
#include "cluster/logger.h"
#include "cluster/members_table.h"
#include "cluster/topic_recovery_service.h"
#include "cluster/topic_recovery_status_rpc_service.h"
#include "rpc/connection_cache.h"

Expand Down
2 changes: 1 addition & 1 deletion src/v/cluster/topic_recovery_status_rpc_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "cluster/topic_recovery_status_rpc_handler.h"

#include "cloud_storage/topic_recovery_service.h"
#include "cluster/topic_recovery_service.h"

namespace cluster {

Expand Down
2 changes: 1 addition & 1 deletion src/v/cluster/topic_recovery_status_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#pragma once

#include "cloud_storage/topic_recovery_service.h"
#include "cluster/topic_recovery_service.h"
#include "serde/envelope.h"

#include <compare>
Expand Down
1 change: 1 addition & 0 deletions src/v/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ v_cc_library(
v::security
boost_filesystem
absl::node_hash_set
yaml-cpp
)
add_subdirectory(tests)
1 change: 1 addition & 0 deletions src/v/hashing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ v_cc_library(
DEPS
xxHash::xxhash
Crc32c::crc32c
GnuTLS::gnutls
DEFINES
-DXXH_PRIVATE_API
)
Expand Down
4 changes: 3 additions & 1 deletion src/v/kafka/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ v_cc_library(
topic_cache.cc
sasl_client.cc
DEPS
v::kafka
v::kafka_protocol
v::ssx
v::storage # batch builder
v::cluster # log cert reload helper
)

add_subdirectory(test)
1 change: 0 additions & 1 deletion src/v/redpanda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ v_cc_library(
v::coproc
v::pandaproxy_rest
v::pandaproxy_schema_registry
v::archival
v::migrations
)

Expand Down
2 changes: 1 addition & 1 deletion src/v/redpanda/admin_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "archival/ntp_archiver_service.h"
#include "cloud_storage/partition_manifest.h"
#include "cloud_storage/remote_partition.h"
#include "cloud_storage/topic_recovery_service.h"
#include "cluster/cloud_storage_size_reducer.h"
#include "cluster/cluster_utils.h"
#include "cluster/config_frontend.h"
Expand All @@ -37,6 +36,7 @@
#include "cluster/security_frontend.h"
#include "cluster/self_test_frontend.h"
#include "cluster/shard_table.h"
#include "cluster/topic_recovery_service.h"
#include "cluster/topic_recovery_status_frontend.h"
#include "cluster/topic_recovery_status_rpc_handler.h"
#include "cluster/topics_frontend.h"
Expand Down
4 changes: 2 additions & 2 deletions src/v/redpanda/application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
#include "archival/upload_housekeeping_service.h"
#include "cli_parser.h"
#include "cloud_storage/cache_service.h"
#include "cloud_storage/partition_recovery_manager.h"
#include "cloud_storage/remote.h"
#include "cloud_storage/topic_recovery_service.h"
#include "cloud_storage_clients/client_pool.h"
#include "cluster/bootstrap_service.h"
#include "cluster/cluster_discovery.h"
Expand All @@ -38,11 +36,13 @@
#include "cluster/node_status_rpc_handler.h"
#include "cluster/partition_balancer_rpc_handler.h"
#include "cluster/partition_manager.h"
#include "cluster/partition_recovery_manager.h"
#include "cluster/rm_partition_frontend.h"
#include "cluster/security_frontend.h"
#include "cluster/self_test_rpc_handler.h"
#include "cluster/service.h"
#include "cluster/tm_stm_cache_manager.h"
#include "cluster/topic_recovery_service.h"
#include "cluster/topic_recovery_status_frontend.h"
#include "cluster/topic_recovery_status_rpc_handler.h"
#include "cluster/topics_frontend.h"
Expand Down
1 change: 1 addition & 0 deletions src/v/security/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ v_cc_library(
DEPS
v::bytes
v::utils
v::rprandom
absl::flat_hash_map
absl::flat_hash_set
cryptopp
Expand Down
2 changes: 1 addition & 1 deletion src/v/test_utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
v_cc_library(
NAME seastar_testing_main
SRCS seastar_testing_main.cc
DEPS Seastar::seastar_testing)
DEPS Seastar::seastar_testing v::rprandom)

add_subdirectory(tests)
5 changes: 3 additions & 2 deletions src/v/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ v_cc_library(
Seastar::seastar
Hdrhistogram::hdr_histogram
aklomp::base64
v::rphashing
v::rprandom
absl::hash
absl::random_seed_sequences
v::bytes
v::rphashing
v::json)
add_subdirectory(tests)

0 comments on commit 56004dd

Please sign in to comment.