This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 c88c6b3c41 [chore](build) Fix linkage errors on macOS (arm64) (#15922)
c88c6b3c41 is described below
commit c88c6b3c4177e96d7f6f6421fe87e01f7c1e1cd8
Author: Adonis Ling <[email protected]>
AuthorDate: Sat Jan 14 18:37:56 2023 +0800
[chore](build) Fix linkage errors on macOS (arm64) (#15922)
macOS with Apple Silicon chip doesn't support AVX2 instructions, we should
build CLucene without AVX2 support.
---
thirdparty/build-thirdparty.sh | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index 3798c54979..ec6b1f4f86 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -1549,15 +1549,21 @@ build_concurrentqueue() {
#clucene
build_clucene() {
- if [[ -z ${USE_AVX2} ]]; then
- USE_AVX2=1
+ if [[ "$(uname -m)" == 'x86_64' ]]; then
+ USE_AVX2="${USE_AVX2:-1}"
+ else
+ USE_AVX2="${USE_AVX2:-0}"
fi
+
if [[ -z ${BUILD_TYPE} ]]; then
BUILD_TYPE=Release
fi
+
check_if_source_exist "${CLUCENE_SOURCE}"
cd "${TP_SOURCE_DIR}/${CLUCENE_SOURCE}"
- mkdir -p "${BUILD_DIR}" && cd "${BUILD_DIR}"
+
+ mkdir -p "${BUILD_DIR}"
+ cd "${BUILD_DIR}"
rm -rf CMakeCache.txt CMakeFiles/
${CMAKE_CMD} -G "${GENERATOR}" -DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}"
-DBUILD_STATIC_LIBRARIES=ON \
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]