Forked from TomSmartBishop/configure_multiple_clang.sh
Created
April 17, 2025 03:06
-
-
Save Binjian/0f4e4067d906ba1ab8d1b699de777924 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