forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-llvm.sh
executable file
·19 lines (14 loc) · 970 Bytes
/
install-llvm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
version=${1:-18}
echo "Installing LLVM version $version"
wget https://apt.llvm.org/llvm.sh -O ~/.local/bin/llvm.sh
chmod +x ~/.local/bin/llvm.sh
sudo ~/.local/bin/llvm.sh $@
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$version 100 \
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-$version \
--slave /usr/bin/clang-cpp clang-cpp /usr/bin/clang-cpp-$version \
--slave /usr/bin/clangd clangd /usr/bin/clangd-$version \
--slave /usr/bin/clang-format clang-format /usr/bin/clang-format-$version \
--slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-$version \
--slave /usr/bin/clang-cl clang-cl /usr/bin/clang-cl-$version \
--slave /usr/bin/clang-query clang-query /usr/bin/clang-query-$version \
--slave /usr/bin/clang-rename clang-rename /usr/bin/clang-rename-$version \