This is an automated email from the ASF dual-hosted git repository.

zykkk 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 2ad43fab449 [opt](build) auto use llvm@16 to format BE's code on MacOS 
(#54455)
2ad43fab449 is described below

commit 2ad43fab4499c226c080f1f3041921fdf7b16b4d
Author: morrySnow <[email protected]>
AuthorDate: Tue Aug 12 11:16:59 2025 +0800

    [opt](build) auto use llvm@16 to format BE's code on MacOS (#54455)
---
 build-support/clang-format.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/build-support/clang-format.sh b/build-support/clang-format.sh
index 78fb4a3e55e..a005e6be3a7 100755
--- a/build-support/clang-format.sh
+++ b/build-support/clang-format.sh
@@ -31,6 +31,18 @@ DORIS_HOME=$(
 )
 export DORIS_HOME
 
+if [[ "$(uname -s)" == 'Darwin' ]]; then
+    if ! command -v brew &>/dev/null; then
+        echo "Error: Homebrew is missing. Please install it first due to we 
use Homebrew to manage the tools which are needed to build the project."
+        exit 1
+    fi
+    if ! brew list llvm@16 > /dev/null 2>&1; then
+        echo "Error: Please install llvm@16 firt due to we use it to format 
code."
+        exit 1
+    fi
+    export PATH=$(brew --prefix llvm@16)/bin:$PATH
+fi
+
 if [[ -z $(command -v clang-format) ]]; then
     echo "clang-format not found, please install clang-format"
     exit 1


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to