forked from starkware-libs/sequencer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dependencies.sh
executable file
·58 lines (51 loc) · 1.15 KB
/
dependencies.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
set -e
[[ ${UID} == "0" ]] || SUDO="sudo"
function install_essential_deps_linux() {
$SUDO bash -c '
apt update && apt install -y \
ca-certificates \
curl \
git \
gnupg \
jq \
libssl-dev \
lsb-release \
pkg-config \
ripgrep \
software-properties-common \
zstd \
wget \
lld
'
}
function setup_llvm_deps() {
case "$(uname)" in
Darwin)
brew update
brew install llvm@19
;;
Linux)
$SUDO bash -c 'curl https://apt.llvm.org/llvm.sh -Lo llvm.sh
bash ./llvm.sh 19 all
rm -f ./llvm.sh
apt update && apt install -y \
libgmp3-dev \
libmlir-19-dev \
libpolly-19-dev \
libzstd-dev \
mlir-19-tools
'
;;
*)
echo "Error: Unsupported operating system"
exit 1
;;
esac
}
function main() {
[ "$(uname)" = "Linux" ] && install_essential_deps_linux
setup_llvm_deps
echo "LLVM dependencies installed successfully."
}
main "$@"