This is an automated email from the ASF dual-hosted git repository. adonisling pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push: new cf16cdf831 [chore](macOS) Use LLVM Clang by default (#19007) cf16cdf831 is described below commit cf16cdf831f1124f2766d3a58a5907bc1e527ac5 Author: Adonis Ling <adonis0...@gmail.com> AuthorDate: Mon Apr 24 21:46:10 2023 +0800 [chore](macOS) Use LLVM Clang by default (#19007) Backport: 1. [chore](macOS) Use LLVM Clang by default #17292 2. [chore](workflow) Fix the workflow BE UT (macOS) #17403 3. [chore](macOS) Disable detect_container_overflow at BE startup #17514 4. [chore](macOS) Specify the version of LLVM for Homebrew to install it #17945 --- .github/workflows/be-ut-mac.yml | 3 ++- .github/workflows/build-thirdparty.yml | 3 ++- be/CMakeLists.txt | 3 +++ be/test/util/threadpool_test.cpp | 4 +++- bin/start_be.sh | 2 +- docs/en/docs/install/source-install/compilation-mac.md | 7 +++---- docs/zh-CN/docs/install/source-install/compilation-mac.md | 5 ++--- env.sh | 3 ++- run-be-ut.sh | 2 +- 9 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/be-ut-mac.yml b/.github/workflows/be-ut-mac.yml index 3307ec11b8..5641cab7f8 100644 --- a/.github/workflows/be-ut-mac.yml +++ b/.github/workflows/be-ut-mac.yml @@ -67,7 +67,7 @@ jobs: 'texinfo' 'coreutils' 'gnu-getopt' - 'python' + 'python@3' 'cmake' 'ninja' 'ccache' @@ -79,6 +79,7 @@ jobs: 'openjdk@11' 'maven' 'node' + 'llvm@15' ) brew install "${cellars[@]}" diff --git a/.github/workflows/build-thirdparty.yml b/.github/workflows/build-thirdparty.yml index 3f6e19dd13..5c4b8848e4 100644 --- a/.github/workflows/build-thirdparty.yml +++ b/.github/workflows/build-thirdparty.yml @@ -134,7 +134,7 @@ jobs: 'texinfo' 'coreutils' 'gnu-getopt' - 'python' + 'python@3' 'cmake' 'ninja' 'ccache' @@ -146,6 +146,7 @@ jobs: 'openjdk@11' 'maven' 'node' + 'llvm@15' ) brew install "${packages[@]}" diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index b3ad886910..7e77a46a99 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -885,6 +885,9 @@ if (${MAKE_TEST} STREQUAL "ON") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov") endif() add_definitions(-DBE_TEST) + if (ARCH_ARM) + add_compile_options(-ffp-contract=off) + endif() endif () add_subdirectory(${SRC_DIR}/agent) diff --git a/be/test/util/threadpool_test.cpp b/be/test/util/threadpool_test.cpp index 7ce870a634..f6ecaf3dc3 100644 --- a/be/test/util/threadpool_test.cpp +++ b/be/test/util/threadpool_test.cpp @@ -331,7 +331,9 @@ TEST_F(ThreadPoolTest, TestDeadlocks) { #ifdef __APPLE__ const char* death_msg = "_ZNSt3__1L8__invokeIRNS_6__bindIMN5doris10ThreadPoolEFvvEJPS3_EEEJEEEDTclscT_fp_" - "spscT0_fp0_EEOS9_DpOSA_"; + "spscT0_fp0_EEOS9_DpOSA_|_ZNSt3__18__invokeB6v15007IRNS_6__" + "bindIMN5doris10ThreadPoolEFvvEJPS3_EEEJEEEDTclclsr3stdE7declvalIT_" + "EEspclsr3stdE7declvalIT0_EEEEOS9_DpOSA_"; #else const char* death_msg = "_ZNSt5_BindIFMN5doris10ThreadPoolEFvvEPS1_EE6__callIvJEJLm0EEEET_OSt5tupleIJDpT0_" diff --git a/bin/start_be.sh b/bin/start_be.sh index 231986940e..dcacbb7af3 100755 --- a/bin/start_be.sh +++ b/bin/start_be.sh @@ -208,7 +208,7 @@ if [[ "${RUN_IN_AWS}" -eq 0 ]]; then fi ## set asan and ubsan env to generate core file -export ASAN_OPTIONS=symbolize=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1 +export ASAN_OPTIONS=symbolize=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1:detect_container_overflow=0 export UBSAN_OPTIONS=print_stacktrace=1 ## set TCMALLOC_HEAP_LIMIT_MB to limit memory used by tcmalloc diff --git a/docs/en/docs/install/source-install/compilation-mac.md b/docs/en/docs/install/source-install/compilation-mac.md index 810d869e19..88394c38d0 100644 --- a/docs/en/docs/install/source-install/compilation-mac.md +++ b/docs/en/docs/install/source-install/compilation-mac.md @@ -30,16 +30,15 @@ This post introduces how to compile from source on macOS (both x86_64 and arm64) ## Prerequisites -1. macOS 12 (Monterey) or newer(_**both Intel chip and Apple Silicon chip are supported**_) -2. Apple Clang 13 or newer(the latest version is recommended) -3. [Homebrew](https://brew.sh/) +1. macOS 12 (Monterey) or newer(_**both Intel chip and Apple Silicon chips are supported**_) +2. [Homebrew](https://brew.sh/) ## Steps 1. Use [Homebrew](https://brew.sh/) to install tools ```shell brew install automake autoconf libtool pkg-config texinfo coreutils gnu-getopt \ - python cmake ninja ccache bison byacc gettext wget pcre maven openjdk@11 npm + python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@15 openjdk@11 npm ``` 2. Compile from source diff --git a/docs/zh-CN/docs/install/source-install/compilation-mac.md b/docs/zh-CN/docs/install/source-install/compilation-mac.md index 3e679d355a..a6393691ff 100644 --- a/docs/zh-CN/docs/install/source-install/compilation-mac.md +++ b/docs/zh-CN/docs/install/source-install/compilation-mac.md @@ -31,15 +31,14 @@ under the License. ## 环境要求 1. macOS 12 (Monterey) 及以上(_**Intel和Apple Silicon均支持**_) -2. Apple Clang 13及以上(最好使用最新版本) -3. [Homebrew](https://brew.sh/) +2. [Homebrew](https://brew.sh/) ## 编译步骤 1. 使用[Homebrew](https://brew.sh/)安装依赖 ```shell brew install automake autoconf libtool pkg-config texinfo coreutils gnu-getopt \ - python cmake ninja ccache bison byacc gettext wget pcre maven openjdk@11 npm + python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@15 openjdk@11 npm ``` 2. 编译源码 diff --git a/env.sh b/env.sh index 171a868468..4d5f063f15 100755 --- a/env.sh +++ b/env.sh @@ -51,7 +51,7 @@ CELLARS=( texinfo coreutils gnu-getopt - python + python@3 cmake ninja ccache @@ -61,6 +61,7 @@ CELLARS=( wget pcre maven + llvm@15 ) for cellar in "\${CELLARS[@]}"; do EXPORT_CELLARS="\${HOMEBREW_REPO_PREFIX}/opt/\${cellar}/bin:\${EXPORT_CELLARS}" diff --git a/run-be-ut.sh b/run-be-ut.sh index 91cf61148a..18e9d078b7 100755 --- a/run-be-ut.sh +++ b/run-be-ut.sh @@ -274,7 +274,7 @@ mkdir "${UT_TMP_DIR}" touch "${UT_TMP_DIR}/tmp_file" # set asan and ubsan env to generate core file -export ASAN_OPTIONS=symbolize=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1 +export ASAN_OPTIONS=symbolize=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1:detect_container_overflow=0 export UBSAN_OPTIONS=print_stacktrace=1 # find all executable test files --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org