diff --git a/.github/build-mysql-darwin.sh b/.github/build-mysql-darwin.sh index 0b6fac0b..b8288db7 100755 --- a/.github/build-mysql-darwin.sh +++ b/.github/build-mysql-darwin.sh @@ -24,14 +24,16 @@ esac PREFIX=$RUNNER_TOOL_CACHE/mysql/$MYSQL_VERSION/$MYSQL_ARCH export LDFLAGS=-Wl,-rpath,$PREFIX/lib -# install LLVM -brew install llvm@17 -LLVM_PATH=$(brew --prefix llvm@17) -export PATH="$LLVM_PATH/bin:$PATH" -export LDFLAGS="$LDFLAGS -L$LLVM_PATH/lib" -export CPPFLAGS="$CPPFLAGS -I$LLVM_PATH/include" -export CC=$LLVM_PATH/bin/clang -export CXX=$LLVM_PATH/bin/clang++ +if [[ "$MYSQL_VERSION" =~ ^[89][.] ]]; then # MySQL 8.0 or later + # install LLVM + brew install llvm@17 + LLVM_PATH=$(brew --prefix llvm@17) + export PATH="$LLVM_PATH/bin:$PATH" + export LDFLAGS="$LDFLAGS -L$LLVM_PATH/lib" + export CPPFLAGS="$CPPFLAGS -I$LLVM_PATH/include" + export CC=$LLVM_PATH/bin/clang + export CXX=$LLVM_PATH/bin/clang++ +fi # detect the number of CPU Core JOBS=$(sysctl -n hw.logicalcpu_max)