22 Commits

Author SHA1 Message Date
Regal 58ad9048b9 build: complete UBRING Bazel and CI support (#3445)
Add the missing BRPC_WITH_UBRING Bazel configuration, wire it through
the library and example targets, and document the supported build
commands.

Enable RDMA and UBRING in CI jobs whose all-options configurations did
not exercise those features. Run both feature suites in the existing
Bazel unit-test jobs and enable RDMA in the Make unit-test job.

Use unsigned literals for UBRING atomic counter operations to match the
counter type and avoid template deduction failures on stricter
compilers.

Signed-off-by: Zhengwei Zhu <141622927+ZhengweiZhu@users.noreply.github.com>
2026-08-15 09:54:19 +08:00
Bright Chen 7a3e034e20 Fix brpc_proto_library failure when brpc is used as an external Bazel dependency (#3427) 2026-08-09 14:47:53 +08:00
dwh110 956227b077 cputime optimize for arm64 (#3247)
* cputime optimize for arm64
Update src/butil/time.cpp
modify  using __attribute__((constructor)) and merge init_invariant_cpu_freq to inside function read_invariant_cpu_frequency

* Add the macro switch BUTIL_USE_CPU_FREQUENCY while preserving the original default behavior for ARM64

* 1、Activation options: CMake -DWITH_CPU_FREQUENCY=ON, Bazel --define BUTIL_USE_CPU_FREQUENCY=true, script argument --with-cpu-frequency.
2、Disabled by default for consistent legacy behavior.

* fix compile failed

---------

Co-authored-by: seekdwh <dongweihao@huawei.com>
2026-08-06 14:09:21 +08:00
Bright Chen cd3948ceac Refactor Bazel build with custom proto rules and build all test targets (#3313) 2026-05-31 10:48:30 +08:00
Bright Chen f97f23edba Hide libunwind's _Unwind_* symbols under Bazel to fix bthread_tracer crash (#3297)
libunwind ships its `src/unwind/*.c` (the GCC `_Unwind_*`
ABI compatibility layer) as exported symbols of `libexternal_S~libunwind.so`.
At runtime the dynamic loader resolves `_Unwind_*` lookups (from
`pthread_exit`, libstdc++'s `__gxx_personality_v0`, etc.) to libunwind's
DWARF-based implementation instead of `libgcc_s.so.1`, hitting an
uninitialized internal context and crashing on the no-return cleanup chain
triggered by pthread_exit / C++ exception unwinding -- e.g. it makes
BthreadTest.bthread_exit segfault deterministically when
`--define=with_bthread_tracer=true` is on.

This is purely an ELF runtime symbol-resolution-order issue and reproduces
identically on GCC and Clang, since both default to `libstdc++ + libgcc_s`
on Linux.
2026-05-27 10:56:43 +08:00
Bright Chen 1d3bded92a Support higher performance bvar with babylon counter (#3116)
* Support higher performance bvar with babylon counter

* Update documents
2025-10-26 15:22:43 +08:00
fanbingxin cd22e4802e bazel: add config setting for NO_PTHREAD_MUTEX_HOOK (#3090) 2025-09-15 20:25:37 +08:00
tongke 6ef8b9ddeb Fix libunwind linked by default on x86_64 cpu when building via bazel (#2973)
* Fix libunwind linked by default on x86_64 cpu when build with bazel

* fix errors in getting_started.md english version

* add link libunwind instruction for bazel
2025-05-24 20:07:54 +08:00
Bright Chen 7a7d1c83e5 Support AddressSanitizer (#2890)
* Support AddressSanitizer

* Add gperftools helper header
2025-03-26 20:07:45 +08:00
Bright Chen f4e00acc30 Support detection of mutex deadlock caused by double lock (#2765)
* Support detection of bthread mutex and FastMutex deadlock caused by double lock

* Support detection of pthread mutex deadlock caused by double lock
2024-10-13 20:37:53 +08:00
Bright Chen 9680d31edb Support timedlock of fast/hook pthread and bthread::Mutex (#2760)
* Support timedlock of fast/hook pthread and bthread::Mutex

* Disable bthread sche safety debug by default
2024-10-09 12:36:00 +08:00
Dongsheng He 761b399e50 Support compile with boringssl (#2399)
* support boringssl

* add CMakeLists

* fix

* suopport boring ssl bazel

* fix AddBioBuffer code

* fix compile

* add boringssl compile bazel ci

* set compile with boringssl as a dependent job

---------

Co-authored-by: Dongsheng He <hds@dipeak.com>
2023-10-25 15:04:53 +08:00
372046933 0541066ef0 Use Hedron's Compile Commands Extractor for Bazel (#2250) 2023-05-22 15:49:35 +08:00
Tuvie 71af04c568 Merge branch 'master' into master 2022-09-22 23:56:39 +08:00
Shuai Zhang ad20082010 Chore: rework Bazel build system 2022-08-31 11:00:55 +08:00
zhujiashun 2b96d08e94 insert_apache_header 2019-10-25 18:01:21 +08:00
tanzhongyibidu 3ea48111d6 add license header for make, dockerfile,etc 2019-10-09 15:20:52 +08:00
Wangweizhen 775a385bdc chore: update bazel 2019-05-10 11:41:57 +08:00
zhenren 10e65c9946 chore: update google_protobuf 2018-06-26 11:53:24 +08:00
donghuixu ce04d18af2 bazel build support glog 2017-12-28 21:17:31 +08:00
donghuixu ed28de7091 add workspace.bzl and bazel.rc 2017-12-12 11:56:34 +08:00
donghuixu ab65fb0f02 support bazel build 2017-12-05 12:08:46 +08:00