LLVM installation on Ubuntu 20.04


I am wondering how to install the LLVM libraries for developing a compiler on Ubuntu 20.04.



Hi Anshil,

based on this: How to install latest clang (6.0) on Ubuntu 16.04 (xenial) / WSL

This should work Bionic - installing LLVM-9:

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add-
sudo apt-add-repository "deb Index of /bionic/ llvm-toolchain-bionic-9 main"
sudo apt-get update
sudo apt-get install -y llvm-9 llvm-9-dev clang-9 llvm-9-tools


give clang and llvm 10 for apt install from 20.04. No need to add a repository.

Neil Nelson

I built it from source for x86 and cross compiling for aarch64 and arm. Just FYI