-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ji Bin <[email protected]>
- Loading branch information
Showing
3 changed files
with
155 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
diff --git a/scripts/core_build.sh b/scripts/core_build.sh | ||
index 5d079c317..2eccfbd0b 100755 | ||
--- a/scripts/core_build.sh | ||
+++ b/scripts/core_build.sh | ||
@@ -193,12 +193,24 @@ conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/c | ||
unameOut="$(uname -s)" | ||
case "${unameOut}" in | ||
Darwin*) | ||
- llvm_prefix="$(brew --prefix llvm)" | ||
+ # detect llvm version by valid list | ||
+ for llvm_version in 15 14 NOT_FOUND ; do | ||
+ if brew ls --versions llvm@${llvm_version} > /dev/null; then | ||
+ break | ||
+ fi | ||
+ done | ||
+ if [ "${llvm_version}" = "NOT_FOUND" ] ; then | ||
+ echo "llvm@14~15 is not installed" | ||
+ exit 1 | ||
+ fi | ||
+ llvm_prefix="$(brew --prefix llvm@${llvm_version})" | ||
export CLANG_TOOLS_PATH="${llvm_prefix}/bin" | ||
+ export PATH=${CLANG_TOOLS_PATH}:${PATH} | ||
export CC="${llvm_prefix}/bin/clang" | ||
export CXX="${llvm_prefix}/bin/clang++" | ||
- export CFLAGS=-Wno-deprecated-declarations | ||
- export CXXFLAGS=-Wno-deprecated-declarations | ||
+ export CFLAGS="-Wno-deprecated-declarations -I$(brew --prefix libomp)/include" | ||
+ export CXXFLAGS=${CFLAGS} | ||
+ export LDFLAGS="-L$(brew --prefix libomp)/lib" | ||
conan install ${CPP_SRC_DIR} --install-folder conan --build=missing -s compiler=clang -s compiler.version=15 -s compiler.libcxx=libc++ || { echo 'conan install failed'; exit 1; } | ||
;; | ||
Linux*) | ||
diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh | ||
index 93a81669d..5c5440880 100755 | ||
--- a/scripts/install_deps.sh | ||
+++ b/scripts/install_deps.sh | ||
@@ -50,25 +50,10 @@ function install_linux_deps() { | ||
|
||
function install_mac_deps() { | ||
sudo xcode-select --install > /dev/null 2>&1 | ||
- brew install libomp ninja cmake llvm ccache grep | ||
- export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH" | ||
- brew update && brew upgrade && brew cleanup | ||
+ brew install libomp ninja cmake llvm@15 ccache pkg-config openssl librdkafka | ||
+ brew install grep | ||
|
||
pip3 install conan==1.58.0 | ||
- | ||
- if [[ $(arch) == 'arm64' ]]; then | ||
- brew install openssl | ||
- brew install librdkafka | ||
- brew install pkg-config | ||
- sudo mkdir /usr/local/include | ||
- sudo mkdir /usr/local/opt | ||
- sudo ln -s "$(brew --prefix llvm)" "/usr/local/opt/llvm" | ||
- sudo ln -s "$(brew --prefix libomp)/include/omp.h" "/usr/local/include/omp.h" | ||
- sudo ln -s "$(brew --prefix libomp)" "/usr/local/opt/libomp" | ||
- sudo ln -s "$(brew --prefix boost)/include/boost" "/usr/local/include/boost" | ||
- sudo ln -s "$(brew --prefix tbb)/include/tbb" "/usr/local/include/tbb" | ||
- sudo ln -s "$(brew --prefix tbb)/include/oneapi" "/usr/local/include/oneapi" | ||
- fi | ||
} | ||
|
||
if ! command -v go &> /dev/null |