-
-
Save ivanitskiy/5f6a1482bd3a21a9d093980005434462 to your computer and use it in GitHub Desktop.
install clang on Debian 9
This file contains hidden or 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
# Add apt.llvm.org repository and install clang | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - | |
sudo apt-add-repository "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch main" | |
sudo apt-get update | |
sudo apt-get install -y clang clang-format clang-tidy lldb libc++-8-dev libc++abi-8-dev | |
# Check version | |
clang --version | |
clang++ --version | |
# Use clang as default compiler | |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 90 | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 90 | |
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++ 90 | |
# Check default compiler tools | |
cc --version | |
c++ --version | |
cpp --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment