Skip to content

Instantly share code, notes, and snippets.

@ssledz
Created June 13, 2020 08:41
Show Gist options
  • Save ssledz/e11f7d0215e49a196439a40a78de5b31 to your computer and use it in GitHub Desktop.
Save ssledz/e11f7d0215e49a196439a40a78de5b31 to your computer and use it in GitHub Desktop.
llvm-4.0 alternatives
#!/usr/bin/env sh
# Remove all existing alternatives
sudo update-alternatives --remove-all llvm
# exit on first error
set -e
# llvm-4.0
sudo update-alternatives \
--install /usr/lib/llvm llvm /usr/lib/llvm-4.0 10 \
--slave /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-4.0 \
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-4.0 \
--slave /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-4.0 \
--slave /usr/bin/llvm-bcanalyzer llvm-bcanalyzer /usr/bin/llvm-bcanalyzer-4.0 \
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-4.0 \
--slave /usr/bin/llvm-diff llvm-diff /usr/bin/llvm-diff-4.0 \
--slave /usr/bin/llvm-dis llvm-dis /usr/bin/llvm-dis-4.0 \
--slave /usr/bin/llvm-dwarfdump llvm-dwarfdump /usr/bin/llvm-dwarfdump-4.0 \
--slave /usr/bin/llvm-extract llvm-extract /usr/bin/llvm-extract-4.0 \
--slave /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-4.0 \
--slave /usr/bin/llvm-mc llvm-mc /usr/bin/llvm-mc-4.0 \
--slave /usr/bin/llvm-mcmarkup llvm-mcmarkup /usr/bin/llvm-mcmarkup-4.0 \
--slave /usr/bin/llvm-nm llvm-nm /usr/bin/llvm-nm-4.0 \
--slave /usr/bin/llvm-objdump llvm-objdump /usr/bin/llvm-objdump-4.0 \
--slave /usr/bin/llvm-ranlib llvm-ranlib /usr/bin/llvm-ranlib-4.0 \
--slave /usr/bin/llvm-readobj llvm-readobj /usr/bin/llvm-readobj-4.0 \
--slave /usr/bin/llvm-rtdyld llvm-rtdyld /usr/bin/llvm-rtdyld-4.0 \
--slave /usr/bin/llvm-size llvm-size /usr/bin/llvm-size-4.0 \
--slave /usr/bin/llvm-stress llvm-stress /usr/bin/llvm-stress-4.0 \
--slave /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-4.0 \
--slave /usr/bin/llvm-tblgen llvm-tblgen /usr/bin/llvm-tblgen-4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment