Skip to content

Instantly share code, notes, and snippets.

@RaymondKroon
Forked from jc00ke/llvm-update-alternatives
Last active July 6, 2020 16:48
Show Gist options
  • Save RaymondKroon/da6650bc72630b963a44 to your computer and use it in GitHub Desktop.
Save RaymondKroon/da6650bc72630b963a44 to your computer and use it in GitHub Desktop.
LLVM & clang alternatives
#!/usr/bin/env sh
sudo update-alternatives --install \
/usr/bin/llvm-config llvm-config /usr/bin/llvm-config-3.6 200 \
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-3.6 \
--slave /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.6 \
--slave /usr/bin/llvm-bcanalyzer llvm-bcanalyzer /usr/bin/llvm-bcanalyzer-3.6 \
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-3.6 \
--slave /usr/bin/llvm-diff llvm-diff /usr/bin/llvm-diff-3.6 \
--slave /usr/bin/llvm-dis llvm-dis /usr/bin/llvm-dis-3.6 \
--slave /usr/bin/llvm-dwarfdump llvm-dwarfdump /usr/bin/llvm-dwarfdump-3.6 \
--slave /usr/bin/llvm-extract llvm-extract /usr/bin/llvm-extract-3.6 \
--slave /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.6 \
--slave /usr/bin/llvm-mc llvm-mc /usr/bin/llvm-mc-3.6 \
--slave /usr/bin/llvm-mcmarkup llvm-mcmarkup /usr/bin/llvm-mcmarkup-3.6 \
--slave /usr/bin/llvm-nm llvm-nm /usr/bin/llvm-nm-3.6 \
--slave /usr/bin/llvm-objdump llvm-objdump /usr/bin/llvm-objdump-3.6 \
--slave /usr/bin/llvm-ranlib llvm-ranlib /usr/bin/llvm-ranlib-3.6 \
--slave /usr/bin/llvm-readobj llvm-readobj /usr/bin/llvm-readobj-3.6 \
--slave /usr/bin/llvm-rtdyld llvm-rtdyld /usr/bin/llvm-rtdyld-3.6 \
--slave /usr/bin/llvm-size llvm-size /usr/bin/llvm-size-3.6 \
--slave /usr/bin/llvm-stress llvm-stress /usr/bin/llvm-stress-3.6 \
--slave /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-3.6 \
--slave /usr/bin/llvm-tblgen llvm-tblgen /usr/bin/llvm-tblgen-3.6
sudo update-alternatives --install \
/usr/bin/llvm-config llvm-config /usr/bin/llvm-config-3.8 200 \
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-3.8 \
--slave /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.8 \
--slave /usr/bin/llvm-bcanalyzer llvm-bcanalyzer /usr/bin/llvm-bcanalyzer-3.8 \
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-3.8 \
--slave /usr/bin/llvm-diff llvm-diff /usr/bin/llvm-diff-3.8 \
--slave /usr/bin/llvm-dis llvm-dis /usr/bin/llvm-dis-3.8 \
--slave /usr/bin/llvm-dwarfdump llvm-dwarfdump /usr/bin/llvm-dwarfdump-3.8 \
--slave /usr/bin/llvm-extract llvm-extract /usr/bin/llvm-extract-3.8 \
--slave /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.8 \
--slave /usr/bin/llvm-mc llvm-mc /usr/bin/llvm-mc-3.8 \
--slave /usr/bin/llvm-mcmarkup llvm-mcmarkup /usr/bin/llvm-mcmarkup-3.8 \
--slave /usr/bin/llvm-nm llvm-nm /usr/bin/llvm-nm-3.8 \
--slave /usr/bin/llvm-objdump llvm-objdump /usr/bin/llvm-objdump-3.8 \
--slave /usr/bin/llvm-ranlib llvm-ranlib /usr/bin/llvm-ranlib-3.8 \
--slave /usr/bin/llvm-readobj llvm-readobj /usr/bin/llvm-readobj-3.8 \
--slave /usr/bin/llvm-rtdyld llvm-rtdyld /usr/bin/llvm-rtdyld-3.8 \
--slave /usr/bin/llvm-size llvm-size /usr/bin/llvm-size-3.8 \
--slave /usr/bin/llvm-stress llvm-stress /usr/bin/llvm-stress-3.8 \
--slave /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-3.8 \
--slave /usr/bin/llvm-tblgen llvm-tblgen /usr/bin/llvm-tblgen-3.8
sudo update-alternatives \
--install /usr/bin/clang clang /usr/bin/clang-3.8 50 \
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 \
--slave /usr/bin/lldb lldb /usr/bin/lldb-3.8 \
--slave /usr/bin/lldb-server lldb-server /usr/bin/lldb-server-3.8
sudo update-alternatives \
--install /usr/bin/clang clang /usr/bin/clang-3.6 50 \
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-3.6 \
--slave /usr/bin/lldb lldb /usr/bin/lldb-3.6 \
--slave /usr/bin/lldb-server lldb-server /usr/bin/lldb-server-3.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment