Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: bazel test --verbose_failures -- //... -//example/...
- run: bazel build --verbose_failures -- //... -//example/...

gcc-compile-with-boringssl:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: bazel test --verbose_failures --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true -- //... -//example/...
- run: bazel build --verbose_failures --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true -- //... -//example/...

gcc-compile-with-make-all-options:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: bazel test --verbose_failures --define with_mesalink=false --define with_glog=true --define with_thrift=true --define with_debug_bthread_sche_safety=true --define with_debug_lock=true -- //... -//example/...
- run: bazel build --verbose_failures --define with_mesalink=false --define with_glog=true --define with_thrift=true --define with_debug_bthread_sche_safety=true --define with_debug_lock=true -- //... -//example/...

clang-compile-with-make:
runs-on: ubuntu-20.04
Expand Down
12 changes: 9 additions & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ COPTS = [
"//bazel/config:brpc_with_debug_bthread_sche_safety": ["-DBRPC_DEBUG_BTHREAD_SCHE_SAFETY=1"],
"//conditions:default": ["-DBRPC_DEBUG_BTHREAD_SCHE_SAFETY=0"],
}) + select({
"//bazel/config:brpc_with_debug_lock": ["-DBRPC_DEBUG_LOCK=1"],
"//conditions:default": ["-DBRPC_DEBUG_LOCK=0"],
"//bazel/config:brpc_with_debug_lock": ["-DBRPC_DEBUG_LOCK=1"],
"//conditions:default": ["-DBRPC_DEBUG_LOCK=0"],
}) + select({
"@platforms//cpu:x86_64": ["-DBRPC_BTHREAD_TRACER"],
"//conditions:default": [],
})

LINKOPTS = [
Expand Down Expand Up @@ -402,7 +405,10 @@ cc_library(
deps = [
":butil",
":bvar",
],
] + select({
"@platforms//cpu:x86_64": ["@com_github_libunwind_libunwind//:libunwind"],
"//conditions:default": [],
}),
)

cc_library(
Expand Down
3 changes: 2 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ bazel_dep(name = 'platforms', version = '0.0.4')
bazel_dep(name = "apple_support", version = "1.17.1")
bazel_dep(name = 'rules_cc', version = '0.0.1')
bazel_dep(name = 'rules_proto', version = '4.0.0')
bazel_dep(name = 'zlib', version = '1.2.13', repo_name = 'com_github_madler_zlib')
bazel_dep(name = 'zlib', version = '1.3.1.bcr.5', repo_name = 'com_github_madler_zlib')
bazel_dep(name = "libunwind", version = "1.8.1", repo_name = 'com_github_libunwind_libunwind')

# --registry=https://baidu.github.io/babylon/registry
bazel_dep(name = 'leveldb', version = '1.23', repo_name = 'com_github_google_leveldb')
Expand Down
4 changes: 2 additions & 2 deletions src/bthread/task_tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ class TaskTracer {

bool OK() const { return err_count == 0; }

static const size_t MAX_TRACE_NUM = 64;
static const size_t MAX_ERROR_NUM = 2;
static constexpr size_t MAX_TRACE_NUM = 64;
static constexpr size_t MAX_ERROR_NUM = 2;

unw_word_t ips[MAX_TRACE_NUM];
char mangled[MAX_TRACE_NUM][256]{};
Expand Down
2 changes: 1 addition & 1 deletion test/bthread_fd_unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ TEST(FDTest, double_close) {
ASSERT_EQ(ec, errno);
}

const char* g_hostname = "baidu.com";
const char* g_hostname = "github.com";
TEST(FDTest, bthread_connect) {
butil::EndPoint ep;
ASSERT_EQ(0, butil::hostname2endpoint(g_hostname, 80, &ep));
Expand Down
2 changes: 1 addition & 1 deletion test/endpoint_unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ TEST(EndPointTest, endpoint_concurrency) {
}
}

const char* g_hostname = "baidu.com";
const char* g_hostname = "github.com";

TEST(EndPointTest, tcp_connect) {
butil::EndPoint ep;
Expand Down