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
7 changes: 6 additions & 1 deletion thirdparty/download-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,12 @@ echo "Finished patching ${AWS_SDK_SOURCE}"

cd "${TP_SOURCE_DIR}/${BRPC_SOURCE}"
if [[ ! -f "${PATCHED_MARK}" ]]; then
for file in "${TP_PATCH_DIR}"/brpc-1.2.0-*.patch; do
# Currently, there are two types of patches for BRPC in Doris:
# 1. brpc-fix-*.patch - These patches are not included in upstream but they can fix some bugs in some specific
# scenarios.
# 2. brpc-{VERSION}-*.patch - These patches are included in upstream but they are not in current VERISON. We
# backport some bug fixes to the current VERSION.
for file in "${TP_PATCH_DIR}"/brpc-*.patch; do
patch -p1 <"${file}"
done
touch "${PATCHED_MARK}"
Expand Down
24 changes: 24 additions & 0 deletions thirdparty/patches/brpc-fix-linux-aarch64-clang-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/src/bthread/task_group.cpp b/src/bthread/task_group.cpp
index b8ead163..94ce5eb7 100644
--- a/src/bthread/task_group.cpp
+++ b/src/bthread/task_group.cpp
@@ -248,6 +248,9 @@ int TaskGroup::init(size_t runqueue_capacity) {
return 0;
}

+#if defined(__linux__) && defined(__aarch64__) && defined(__clang__)
+ __attribute__((optnone))
+#endif
void TaskGroup::task_runner(intptr_t skip_remained) {
// NOTE: tls_task_group is volatile since tasks are moved around
// different groups.
@@ -567,6 +570,9 @@ void TaskGroup::sched(TaskGroup** pg) {
sched_to(pg, next_tid);
}

+#if defined(__linux__) && defined(__aarch64__) && defined(__clang__)
+ __attribute__((optnone))
+#endif
void TaskGroup::sched_to(TaskGroup** pg, TaskMeta* next_meta) {
TaskGroup* g = *pg;
#ifndef NDEBUG