How to install CLang using precompiled binaries?
Perhaps the easiest way to install this archive is to use the following 2 commands:
wget http://llvm.org/releases/3.2/clang+llvm-3.2-x86_64-linux-ubuntu-12.04.tar.gz
sudo tar -C /usr/local -xvf clang+llvm-3.2-x86_64-linux-ubuntu-12.04.tar.gz --strip 1
This works nicely on my 12.04 VM and gives the following:
andrew@ithaca:~$ clang --version
clang version 3.2 (tags/RELEASE_32/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
andrew@ithaca:~$
This installation takes away the ability to easily remove the package with standard Ubuntu package management tools but the following single command will remove all of the installed files:
sudo rm -v /usr/local/bin/{clang*,llc,lli,llvm*,macho-dump,opt,bugpoint,c-index-test} && \
sudo rm -rfv /usr/local/docs/llvm && \
sudo rm -rfv /usr/local/include/{clang,clang-c,llvm,llvm-c} && \
sudo rm -v /usr/local/share/man/man1/clang.1 && \
sudo rm -rfv /usr/local/lib/clang && \
sudo rm -v /usr/local/lib/{BugpointPasses.so,libclang*,libLLVM*,libLTO*,libprofile_rt*,LLVM*}
Tested on my own system and it removes the files cleanly...