This is an automated email from the ASF dual-hosted git repository.
zouxinyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 667f5b5e1c8 [fix](memory) Fix BE compile in Mac with Jemalloc (#34750)
667f5b5e1c8 is described below
commit 667f5b5e1c8959516c09da63afeec17bd6c9537d
Author: Xinyi Zou <[email protected]>
AuthorDate: Mon May 13 19:31:55 2024 +0800
[fix](memory) Fix BE compile in Mac with Jemalloc (#34750)
Fix DORIS_THIRDPARTY
Fix BUILD_TYPE case conversion
---
be/src/runtime/CMakeLists.txt | 2 +-
build.sh | 6 +++++-
cloud/src/common/CMakeLists.txt | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/be/src/runtime/CMakeLists.txt b/be/src/runtime/CMakeLists.txt
index 70db5b4cb52..3bfec93edfc 100644
--- a/be/src/runtime/CMakeLists.txt
+++ b/be/src/runtime/CMakeLists.txt
@@ -25,7 +25,7 @@ set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/runtime")
file(GLOB_RECURSE RUNTIME_FILES CONFIGURE_DEPENDS *.cpp *.cc)
-if (NOT USE_JEMALLOC OR NOT USE_JEMALLOC_HOOK)
+if (NOT USE_JEMALLOC OR NOT USE_MEM_TRACKER OR NOT USE_JEMALLOC_HOOK)
list(REMOVE_ITEM RUNTIME_FILES
${CMAKE_CURRENT_SOURCE_DIR}/memory/jemalloc_hook.cpp)
endif()
diff --git a/build.sh b/build.sh
index b67824ec56f..bec46bf6baf 100755
--- a/build.sh
+++ b/build.sh
@@ -30,6 +30,9 @@ set -eo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
export DORIS_HOME="${ROOT}"
+if [[ -z "${DORIS_THIRDPARTY}" ]]; then
+ export DORIS_THIRDPARTY="${DORIS_HOME}/thirdparty"
+fi
export TP_INCLUDE_DIR="${DORIS_THIRDPARTY}/installed/include"
export TP_LIB_DIR="${DORIS_THIRDPARTY}/installed/lib"
@@ -356,7 +359,8 @@ if [[ -z "${USE_MEM_TRACKER}" ]]; then
USE_MEM_TRACKER='OFF'
fi
fi
-if [[ "${BUILD_TYPE,,}" == "asan" ]]; then
+BUILD_TYPE_LOWWER=$(echo "${BUILD_TYPE}" | tr '[:upper:]' '[:lower:]')
+if [[ "${BUILD_TYPE_LOWWER}" == "asan" ]]; then
USE_JEMALLOC='OFF'
elif [[ -z "${USE_JEMALLOC}" ]]; then
USE_JEMALLOC='ON'
diff --git a/cloud/src/common/CMakeLists.txt b/cloud/src/common/CMakeLists.txt
index b18947b04a1..0b6b2794f6f 100644
--- a/cloud/src/common/CMakeLists.txt
+++ b/cloud/src/common/CMakeLists.txt
@@ -16,7 +16,7 @@ set(COMMON_FILES
network_util.cpp
)
-if (USE_JEMALLOC AND USE_JEMALLOC_HOOK)
+if (USE_JEMALLOC AND USE_MEM_TRACKER AND USE_JEMALLOC_HOOK)
set(COMMON_FILES ${COMMON_FILES}
jemalloc_hook.cpp
)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]