[fix](be) BE UT built against Clang-16 failed (#19610)
If we use Clang-16 to build the third-party libraries and build doris_be_test against them, we can not run doris_be_test successfully. Some errors with BRPC occur. I tested this on Linux (x86_64) and macOS (x86_64/arm64), these errors always raised.
This commit is contained in:
6
thirdparty/download-thirdparty.sh
vendored
6
thirdparty/download-thirdparty.sh
vendored
@ -401,10 +401,12 @@ if [[ "${SIMDJSON_SOURCE}" = "simdjson-3.0.1" ]]; then
|
||||
fi
|
||||
echo "Finished patching ${SIMDJSON_SOURCE}"
|
||||
|
||||
if [[ "${BRPC_SOURCE}" == 'brpc-1.4.0' ]]; then
|
||||
if [[ "${BRPC_SOURCE}" == 'brpc-1.5.0' ]]; then
|
||||
cd "${TP_SOURCE_DIR}/${BRPC_SOURCE}"
|
||||
if [[ ! -f "${PATCHED_MARK}" ]]; then
|
||||
patch -p1 <"${TP_PATCH_DIR}/brpc-1.4.0-gcc13.patch"
|
||||
for patch_file in "${TP_PATCH_DIR}"/brpc-*; do
|
||||
patch -p1 <"${patch_file}"
|
||||
done
|
||||
touch "${PATCHED_MARK}"
|
||||
fi
|
||||
cd -
|
||||
|
||||
22
thirdparty/patches/brpc-1.5.0-clang16.patch
vendored
Normal file
22
thirdparty/patches/brpc-1.5.0-clang16.patch
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/src/bthread/task_group.cpp b/src/bthread/task_group.cpp
|
||||
index 6f5a4abd..e3aef91c 100644
|
||||
--- a/src/bthread/task_group.cpp
|
||||
+++ b/src/bthread/task_group.cpp
|
||||
@@ -248,7 +248,7 @@ int TaskGroup::init(size_t runqueue_capacity) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#if defined(__linux__) && defined(__aarch64__) && defined(__clang__)
|
||||
+#if defined(__clang__)
|
||||
__attribute__((optnone))
|
||||
#endif
|
||||
void TaskGroup::task_runner(intptr_t skip_remained) {
|
||||
@@ -570,7 +570,7 @@ void TaskGroup::sched(TaskGroup** pg) {
|
||||
sched_to(pg, next_tid);
|
||||
}
|
||||
|
||||
-#if defined(__linux__) && defined(__aarch64__) && defined(__clang__)
|
||||
+#if defined(__clang__)
|
||||
__attribute__((optnone))
|
||||
#endif
|
||||
void TaskGroup::sched_to(TaskGroup** pg, TaskMeta* next_meta) {
|
||||
8
thirdparty/vars.sh
vendored
8
thirdparty/vars.sh
vendored
@ -203,10 +203,10 @@ LEVELDB_SOURCE=leveldb-1.23
|
||||
LEVELDB_MD5SUM="afbde776fb8760312009963f09a586c7"
|
||||
|
||||
# brpc
|
||||
BRPC_DOWNLOAD="https://github.com/apache/brpc/archive/refs/tags/1.4.0.tar.gz"
|
||||
BRPC_NAME="brpc-1.4.0.tar.gz"
|
||||
BRPC_SOURCE="brpc-1.4.0"
|
||||
BRPC_MD5SUM="6af9d50822c33a3abc56a1ec0af0e0bc"
|
||||
BRPC_DOWNLOAD="https://github.com/apache/brpc/archive/refs/tags/1.5.0.tar.gz"
|
||||
BRPC_NAME="brpc-1.5.0.tar.gz"
|
||||
BRPC_SOURCE="brpc-1.5.0"
|
||||
BRPC_MD5SUM="d1b6d9b615292dfa5cefa227822c5996"
|
||||
|
||||
# rocksdb
|
||||
ROCKSDB_DOWNLOAD="https://github.com/facebook/rocksdb/archive/v5.14.2.tar.gz"
|
||||
|
||||
Reference in New Issue
Block a user