Created
July 27, 2018 11:21
-
-
Save TomSmartBishop/9adbfe1933e9daa8b49e3a73c374ea8b to your computer and use it in GitHub Desktop.
Configure multiple clang versions on ubuntu
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
| #!/usr/bin/env bash | |
| sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
| sudo apt update | |
| sudo update-alternatives --remove-all clang | |
| sudo apt-get install -y clang-3.9 clang-4.0 clang-5.0 clang-6.0 | |
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 10 | |
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-4.0 20 | |
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 30 | |
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 40 | |
| sudo update-alternatives --set clang /usr/bin/clang | |
| sudo update-alternatives --config clang |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment