-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
29 lines (22 loc) · 976 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
git clone https://github.com/llvm/llvm-project.git
cd ./llvm-project || exit
# TODO: check if cmake is installed
cmake -DLLVM_ENABLE_PROJECTS='clang;compiler-rt' -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -S llvm -B build
NPROC=$(sysctl -n hw.logicalcpu 2>/dev/null || nproc)
cmake --build build --parallel $NPROC
export CLANG_BIN=$(pwd)/build/bin/clang
uname="$(uname)"
if [[ "$uname" == "Darwin" ]]; then
brew install bazel
elif [[ "$uname" == "Linux" ]]; then
sudo apt install apt-transport-https curl gnupg -y
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
sudo mv bazel-archive-keyring.gpg /usr/share/keyrings
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
sudo apt update && sudo apt install bazel
else
exit 1
fi
cd -
pip install -r requirements.txt