Skip to content

Commit

Permalink
Static link
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Jan 1, 2024
1 parent 43aa016 commit cfc7968
Show file tree
Hide file tree
Showing 201 changed files with 719 additions and 414 deletions.
2 changes: 1 addition & 1 deletion .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ header:
- 'src/aio/file_io.h'
- 'src/runtime/task/future_types.h'
- 'src/runtime/global_config.h'
- 'src/common/gpid.h'
- 'src/utils/gpid.h'
- 'src/runtime/rpc/group_address.h'
- 'src/utils/logging_provider.h'
- 'src/runtime/rpc/message_parser.h'
Expand Down
6 changes: 0 additions & 6 deletions cmake_modules/BaseFunctions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ function(dsn_add_static_library)
dsn_install_library()
endfunction(dsn_add_static_library)

function(dsn_add_shared_library)
set(MY_PROJ_TYPE "SHARED")
dsn_add_project()
dsn_install_library()
endfunction(dsn_add_shared_library)

function(dsn_add_executable)
set(MY_PROJ_TYPE "EXECUTABLE")
dsn_add_project()
Expand Down
3 changes: 3 additions & 0 deletions src/aio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_LIBS
dsn_runtime
sasl2
gssapi_krb5
krb5
rocksdb
lz4
zstd
Expand Down
4 changes: 4 additions & 0 deletions src/aio/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ set(MY_PROJ_LIBS
dsn_meta_server
dsn_ranger
dsn_replication_common
sasl2
gssapi_krb5
krb5
dsn_aio
test_utils
dsn_utils
gtest
rocksdb
lz4
Expand Down
2 changes: 1 addition & 1 deletion src/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

set(MY_PROJ_NAME "pegasus_base")
set(MY_PROJ_NAME pegasus_base)

if(UNIX)
add_compile_options(-fPIC)
Expand Down
11 changes: 7 additions & 4 deletions src/base/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ set(MY_PROJ_SRC "")
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_LIBS
dsn_runtime
dsn_utils
pegasus_base
gtest)
dsn_runtime
sasl2
gssapi_krb5
krb5
dsn_utils
pegasus_base
gtest)

set(MY_BOOST_LIBS Boost::system Boost::filesystem)

Expand Down
2 changes: 1 addition & 1 deletion src/block_service/block_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "utils/error_code.h"
#include "utils/threadpool_code.h"
#include "runtime/task/task_code.h"
#include "common/gpid.h"
#include "utils/gpid.h"
#include "runtime/rpc/serialization.h"
#include "runtime/rpc/rpc_stream.h"
#include "runtime/serverlet.h"
Expand Down
3 changes: 3 additions & 0 deletions src/block_service/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ set(MY_PROJ_LIBS
dsn.block_service.local
dsn.block_service.hdfs
dsn_runtime
sasl2
gssapi_krb5
krb5
dsn_utils
gtest
gtest_main
Expand Down
4 changes: 3 additions & 1 deletion src/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_LIBS "")
set(MY_PROJ_LIBS
dsn_utils
dsn_replication_common)

# Extra files that will be installed
set(MY_BINPLACES "")
Expand Down
2 changes: 1 addition & 1 deletion src/client/partition_resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <utility>
#include <vector>

#include "common/gpid.h"
#include "utils/gpid.h"
#include "runtime/rpc/rpc_address.h"
#include "runtime/rpc/rpc_message.h"
#include "runtime/rpc/serialization.h"
Expand Down
2 changes: 1 addition & 1 deletion src/client/partition_resolver_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <utility>
#include <vector>

#include "common/gpid.h"
#include "utils/gpid.h"
#include "dsn.layer2_types.h"
#include "partition_resolver_simple.h"
#include "runtime/api_layer1.h"
Expand Down
5 changes: 3 additions & 2 deletions src/client/replication_ddl_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "backup_types.h"
#include "common//duplication_common.h"
#include "common/bulk_load_common.h"
#include "common/gpid.h"
#include "utils/gpid.h"
#include "common/manual_compact.h"
#include "common/partition_split_common.h"
#include "common/replication.codes.h"
Expand Down Expand Up @@ -513,8 +513,9 @@ std::string host_name_resolve(bool resolve_ip, std::string value)
{
if (resolve_ip) {
std::string temp;
if (dsn::utils::hostname_from_ip_port(value.c_str(), &temp))
if (dsn::utils::hostname_from_ip_port(value.c_str(), &temp)) {
return temp;
}
}
return value;
}
Expand Down
3 changes: 3 additions & 0 deletions src/client/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ set(MY_PROJ_LIBS
dsn_client
dsn_replication_common
dsn_runtime
sasl2
gssapi_krb5
krb5
dsn_utils
gtest
rocksdb
Expand Down
2 changes: 1 addition & 1 deletion src/client_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

# TODO(yingchun): should export shared lib too!!!
set(MY_PROJ_NAME "pegasus_client_static")
set(MY_PROJ_NAME pegasus_client_static)

add_definitions(-fPIC)

Expand Down
2 changes: 1 addition & 1 deletion src/client_lib/pegasus_scanner_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <vector>

#include "base/pegasus_const.h"
#include "common/gpid.h"
#include "utils/gpid.h"
#include "pegasus/client.h"
#include "pegasus/error.h"
#include "pegasus_client_impl.h"
Expand Down
2 changes: 1 addition & 1 deletion src/common/backup_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "backup_common.h"

#include "common/gpid.h"
#include "utils/gpid.h"
#include "runtime/api_layer1.h"
#include "runtime/rpc/rpc_address.h"

Expand Down
2 changes: 1 addition & 1 deletion src/common/fs_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <utility>

#include "absl/strings/string_view.h"
#include "common/gpid.h"
#include "utils/gpid.h"
#include "common/replication_enums.h"
#include "fmt/core.h"
#include "replica_admin_types.h"
Expand Down
2 changes: 1 addition & 1 deletion src/common/json_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "utils/error_code.h"
#include "utils/threadpool_code.h"
#include "runtime/task/task_code.h"
#include "common/gpid.h"
#include "utils/gpid.h"
#include "meta_admin_types.h"
#include "partition_split_types.h"
#include "duplication_types.h"
Expand Down
2 changes: 1 addition & 1 deletion src/common/replication.codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "utils/error_code.h"
#include "utils/threadpool_code.h"
#include "runtime/task/task_code.h"
#include "common/gpid.h"
#include "utils/gpid.h"

DEFINE_THREAD_POOL_CODE(THREAD_POOL_META_SERVER)
DEFINE_THREAD_POOL_CODE(THREAD_POOL_META_STATE)
Expand Down
2 changes: 1 addition & 1 deletion src/common/replication_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <memory>
#include <set>

#include "common/gpid.h"
#include "utils/gpid.h"
#include "common/replica_envs.h"
#include "common/replication_other_types.h"
#include "dsn.layer2_types.h"
Expand Down
2 changes: 1 addition & 1 deletion src/common/storage_serverlet.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "utils/error_code.h"
#include "utils/threadpool_code.h"
#include "runtime/task/task_code.h"
#include "common/gpid.h"
#include "utils/gpid.h"
#include "runtime/rpc/serialization.h"
#include "runtime/rpc/rpc_stream.h"
#include "runtime/serverlet.h"
Expand Down
4 changes: 4 additions & 0 deletions src/common/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ set(MY_PROJ_LIBS
dsn_http
dsn_replication_common
dsn_runtime
sasl2
gssapi_krb5
krb5
dsn_utils
gtest
rocksdb
lz4
Expand Down
2 changes: 1 addition & 1 deletion src/common/test/fs_manager_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <vector>

#include "common/fs_manager.h"
#include "common/gpid.h"
#include "utils/gpid.h"
#include "common/replication_other_types.h"
#include "gtest/gtest.h"
#include "metadata_types.h"
Expand Down
2 changes: 1 addition & 1 deletion src/failure_detector/fd.code.definition.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "utils/error_code.h"
#include "utils/threadpool_code.h"
#include "runtime/task/task_code.h"
#include "common/gpid.h"
#include "utils/gpid.h"
#include "runtime/rpc/serialization.h"
#include "runtime/rpc/rpc_stream.h"
#include "runtime/serverlet.h"
Expand Down
18 changes: 16 additions & 2 deletions src/failure_detector/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,28 @@ set(MY_PROJ_NAME dsn.failure_detector.tests)
set(MY_PROJ_SRC "")
set(MY_SRC_SEARCH_MODE "GLOB")
set(MY_PROJ_LIBS
dsn_runtime
dsn_meta_server
dsn_ranger
dsn_runtime
sasl2
gssapi_krb5
krb5
dsn_replica_server
dsn.security
dsn_nfs
dsn_aio
dsn_dist_cmd
dsn_replication_common
dsn.block_service
dsn.block_service.hdfs
dsn.block_service.local
dsn.failure_detector
gtest
dsn.replication.zookeeper_provider
zookeeper
hashtable
dsn_utils
gtest
test_utils
rocksdb
lz4
zstd
Expand Down
16 changes: 12 additions & 4 deletions src/geo/bench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,25 @@ set(MY_PROJ_SRC "")
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_LIBS
dsn_runtime
sasl2
gssapi_krb5
krb5
pegasus_geo_lib
pegasus_client_static
dsn_client
dsn_utils
dsn_http
dsn_replication_common
absl::flat_hash_set
absl::strings
pegasus_geo_lib
s2testing
s2
pegasus_client_static
thrift
rocksdb
lz4
zstd
snappy
dsn_utils)
snappy)

set(MY_BOOST_LIBS Boost::system Boost::filesystem)

Expand Down
7 changes: 3 additions & 4 deletions src/geo/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_LIBS ""
# s2
# pegasus_client_static
)
set(MY_PROJ_LIBS
s2
pegasus_client_static)

set(MY_BOOST_LIBS Boost::system Boost::filesystem)

Expand Down
5 changes: 5 additions & 0 deletions src/geo/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,17 @@ set(MY_PROJ_SRC "")
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_LIBS
dsn_runtime
sasl2
gssapi_krb5
krb5
absl::flat_hash_set
absl::strings
pegasus_geo_lib
s2testing
s2
pegasus_client_static
dsn_client
dsn_utils
gtest)

Expand Down
3 changes: 2 additions & 1 deletion src/http/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ set(MY_PROJ_SRC ${THIRDPARTY_ROOT}/build/Source/http-parser/http_parser.c)

set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_LIBS "")
set(MY_PROJ_LIBS
dsn_replication_common)

dsn_add_static_library()

Expand Down
13 changes: 7 additions & 6 deletions src/http/http_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,13 @@ class http_server_base : public http_service
{
static std::once_flag flag;
std::call_once(flag, [&]() {
register_handler("updateConfig",
std::bind(&http_server_base::update_config_handler,
this,
std::placeholders::_1,
std::placeholders::_2),
"ip:port/updateConfig?<key>=<value>");
// undefined reference to `dsn::http_server_base::update_config_handler
// register_handler("updateConfig",
// std::bind(&http_server_base::update_config_handler,
// this,
// std::placeholders::_1,
// std::placeholders::_2),
// "ip:port/updateConfig?<key>=<value>");
});
}

Expand Down
8 changes: 6 additions & 2 deletions src/http/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ set(MY_SRC_SEARCH_MODE "GLOB")
set(MY_PROJ_LIBS
dsn_http
dsn_runtime
sasl2
gssapi_krb5
krb5
dsn_utils
curl
gtest
rocksdb
lz4
zstd
snappy)
snappy
zstd)

set(MY_BOOST_LIBS Boost::system Boost::filesystem)

Expand Down
Loading

0 comments on commit cfc7968

Please sign in to comment.