LLVM Debian/Ubuntu nightly packages
Download

The goal is to provide Debian and Ubuntu nightly packages ready to be installed with minimal impact on the distribution.
Packages are available for amd64, i386 (except for recent Ubuntu), s390x and arm64 (aka aarch64). This for both the stable, qualification and development branches (currently 15, 16 and 17).

Packages are built using stage2 and extremely similar to the one shipping in Debian & Ubuntu.

The packages provide LLVM + Clang + compiler-rt + polly + LLDB + LLD + libFuzzer + libc++ + libc++abi + openmp + libclc + libunwind + MLIR + BOLT + flang + wasm support

News
For the past year (2022), the work on apt.llvm.org has been partially supported by the OpenSSF, Google, & The Linux Foundation.
This platform serves more than 35tb of packages every month and is used by various actors like the Linux Kernel, TensorFlow, etc and referenced more than 24k times on Github.
The main goal of this support is to improve the security and sustainability of this platform. Previously we were running on an old rack that was no longer supported, and sooner or later would have failed. Now we're running on a cloud-based build platform where the cloud provider is keeping the hardware up-to-date.
We deployed sigstore support, which makes it easier for users to verify that the packages came from us and to detect potential malicious signatures. We even contributed upstream to sigstore, helping future users of sigstore.
In parallel, we continued to ship new releases, enable new features (bolt, etc) etc.

Jan 03rd 2023 - libclang-common-X.Y-dev split into: libclang-rt-X.Y-dev, libpolly-X.Y-dev, libclang-rt-X.Y-dev-wasm32 and libclang-rt-X.Y-dev-wasm64
Jan 03rt 2023 - Support of wasm improved with new packages: libc++-X.Y-dev-wasm32, libc++abi-X.Y-dev-wasm32, libclang-rt-X.Y-dev-wasm32 and libclang-rt-X.Y-dev-wasm64 (recent distros)
Jan 03rd 2023 - flang packages added
Oct 31th 2022 - Debian Stretch disabled (EOL)
Oct 07th 2022 - Ubuntu Kinetic (22.10) enabled
Sep 22th 2022 - BOLT packages added
Jul 31th 2022 - Snapshot becomes 16, branch 15 created
Jul 24th 2022 - Ubuntu Hirsute (21.04) and Impish (21.10) disabled (EOL)
Feb 18th 2022 - Ubuntu Jammy (22.04) enabled
Feb 04th 2022 - Snapshot becomes 15, branch 14 created
Jan 16th 2022 - llvm.sh can now install all packages at once with the 'all' option
Jan 15th 2022 - Sources and dsc files are signed on sigstore
Dec 30th 2021 - MLIR packages added from 13
Dec 23th 2021 - Ubuntu Groovy (20.10) disabled (EOL)
Dec 22nd 2021 - arm64 supported
Nov 02nd 2021 - Infra moved to the cloud
Oct 05th 2021 - Ubuntu Impish (21.10) enabled
Aug 01st 2021 - Snapshot becomes 14, branch 13 created
Aug 01st 2021 - libunwind packages are generated (libunwind-XX & libunwind-XX-dev)
Jul 25th 2021 - Packages are tested against the LLVM integration test suite
May 01st 2021 - libclc packages generated from 12. Thanks to Timo Aaltonen
Apr 25th 2021 - S390X support added
Mar 28th 2021 - Ubuntu Xenial (16.04) disabled (EOL)
Feb 01st 2021 - Snapshot becomes 13, branch 12 created
Feb 01st 2021 - Debian Bullseye (11) added
Automatic installation script
For convenience there is an automatic installation script available that installs LLVM for you.
To install the latest stable version:
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"

To install a specific version of LLVM:
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh <version number>
To install all apt.llvm.org packages at once:
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh <version number> all
# or
sudo ./llvm.sh all
Debian
Buster (Debian 10 - old-stable) - Last update : Fri, 31 Mar 2023 13:54:24 UTC / Revision: 20230331115445+cbca9ce91c64
deb http://apt.llvm.org/buster/ llvm-toolchain-buster main
deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster main
# 15 
deb http://apt.llvm.org/buster/ llvm-toolchain-buster-15 main
deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-15 main
# 16 
deb http://apt.llvm.org/buster/ llvm-toolchain-buster-16 main
deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-16 main
Bullseye (Debian 11 - stable) - Last update : Fri, 31 Mar 2023 10:34:01 UTC / Revision: 20230331072102+cb3f1e2d12c6
deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye main
deb-src http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye main
# 15 
deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main
deb-src http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main
# 16 
deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-16 main
deb-src http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-16 main
sid (unstable) - Last update : Fri, 31 Mar 2023 15:58:27 UTC / Revision: 20230330121131+3947422a77b8
deb http://apt.llvm.org/unstable/ llvm-toolchain main
deb-src http://apt.llvm.org/unstable/ llvm-toolchain main
# 15 
deb http://apt.llvm.org/unstable/ llvm-toolchain-15 main
deb-src http://apt.llvm.org/unstable/ llvm-toolchain-15 main
# 16 
deb http://apt.llvm.org/unstable/ llvm-toolchain-16 main
deb-src http://apt.llvm.org/unstable/ llvm-toolchain-16 main

Ubuntu
Precise, Quantal, Raring, Saucy, Utopic, Artful, Cosmic, Eoan and Trusty are no longer supported by Ubuntu. Repo remains available but not updated.

As i386 isn't supported by Ubuntu anymore, apt.llvm.org isn't either.

Bionic LTS (18.04) - Last update : Fri, 31 Mar 2023 11:07:25 UTC / Revision: 20230331091833+c5c9b01e74bb
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main
# Needs 'sudo add-apt-repository ppa:ubuntu-toolchain-r/test' for libstdc++ with C++20 support
# 15
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-15 main
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-15 main
# 16
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-16 main
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-16 main
Focal (20.04) LTS - Last update : Fri, 31 Mar 2023 19:23:45 UTC / Revision: 20230331052612+855d3cb8e3e8
deb http://apt.llvm.org/focal/ llvm-toolchain-focal main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main
# 15
deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main
# 16
deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main
Jammy (22.04) LTS - Last update : Wed, 29 Mar 2023 16:49:36 UTC / Revision: 20230329031506+d4879d769095
deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main
deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy main
# 15
deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main
deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main
# 16
deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main
deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main
Kinetic (22.10) - Last update : Tue, 28 Mar 2023 17:15:27 UTC / Revision: 20230327034436+da92f2fb33c4
deb http://apt.llvm.org/kinetic/ llvm-toolchain-kinetic main
deb-src http://apt.llvm.org/kinetic/ llvm-toolchain-kinetic main
# 15
deb http://apt.llvm.org/kinetic/ llvm-toolchain-kinetic-15 main
deb-src http://apt.llvm.org/kinetic/ llvm-toolchain-kinetic-15 main
# 16
deb http://apt.llvm.org/kinetic/ llvm-toolchain-kinetic-16 main
deb-src http://apt.llvm.org/kinetic/ llvm-toolchain-kinetic-16 main
Default packages
To make sure always the most recent versions of the packages are installed, we are providing some default packages.
To install all of them (currently version 17):

apt-get install clang-format clang-tidy clang-tools clang clangd libc++-dev libc++1 libc++abi-dev libc++abi1 libclang-dev libclang1 liblldb-dev libllvm-ocaml-dev libomp-dev libomp5 lld lldb llvm-dev llvm-runtime llvm python3-clang

Install
(stable branch)
To retrieve the archive signature:

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
# or
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
# Fingerprint: 6084 F3CF 814B 57C1 CF12 EFD5 15CF 4D18 AF4F 7421


To install just clang, lld and lldb (15 release):

apt-get install clang-15 lldb-15 lld-15


To install all key packages:

# LLVM
apt-get install libllvm-15-ocaml-dev libllvm15 llvm-15 llvm-15-dev llvm-15-doc llvm-15-examples llvm-15-runtime
# Clang and co
apt-get install clang-15 clang-tools-15 clang-15-doc libclang-common-15-dev libclang-15-dev libclang1-15 clang-format-15 python3-clang-15 clangd-15 clang-tidy-15
# compiler-rt
apt-get install libclang-rt-15-dev
# polly
apt-get install libpolly-15-dev
# libfuzzer
apt-get install libfuzzer-15-dev
# lldb
apt-get install lldb-15
# lld (linker)
apt-get install lld-15
# libc++
apt-get install libc++-15-dev libc++abi-15-dev
# OpenMP
apt-get install libomp-15-dev
# libclc
apt-get install libclc-15-dev
# libunwind
apt-get install libunwind-15-dev
# mlir
apt-get install libmlir-15-dev mlir-15-tools
# bolt
apt-get install libbolt-15-dev bolt-15
# flang
apt-get install flang-15
# wasm support
apt-get install libclang-rt-15-dev-wasm32 libclang-rt-15-dev-wasm64 libc++-15-dev-wasm32 libc++abi-15-dev-wasm32 libclang-rt-15-dev-wasm32 libclang-rt-15-dev-wasm64

Install
(qualification branch)
To retrieve the archive signature:

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
# or
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
# Fingerprint: 6084 F3CF 814B 57C1 CF12 EFD5 15CF 4D18 AF4F 7421


To install just clang, lld and lldb (16 release):

apt-get install clang-16 lldb-16 lld-16


To install all key packages:

# LLVM
apt-get install libllvm-16-ocaml-dev libllvm16 llvm-16 llvm-16-dev llvm-16-doc llvm-16-examples llvm-16-runtime
# Clang and co
apt-get install clang-16 clang-tools-16 clang-16-doc libclang-common-16-dev libclang-16-dev libclang1-16 clang-format-16 python3-clang-16 clangd-16 clang-tidy-16
# compiler-rt
apt-get install libclang-rt-16-dev
# polly
apt-get install libpolly-16-dev
# libfuzzer
apt-get install libfuzzer-16-dev
# lldb
apt-get install lldb-16
# lld (linker)
apt-get install lld-16
# libc++
apt-get install libc++-16-dev libc++abi-16-dev
# OpenMP
apt-get install libomp-16-dev
# libclc
apt-get install libclc-16-dev
# libunwind
apt-get install libunwind-16-dev
# mlir
apt-get install libmlir-16-dev mlir-16-tools
# bolt
apt-get install libbolt-16-dev bolt-16
# flang
apt-get install flang-16
# wasm support
apt-get install libclang-rt-16-dev-wasm32 libclang-rt-16-dev-wasm64 libc++-16-dev-wasm32 libc++abi-16-dev-wasm32 libclang-rt-16-dev-wasm32 libclang-rt-16-dev-wasm64

Install
(development branch)
To retrieve the archive signature:

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
# or
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
# Fingerprint: 6084 F3CF 814B 57C1 CF12 EFD5 15CF 4D18 AF4F 7421


We also provide meta packages to move from a major version to the other.
For example, to automatically upgrade to the current major:

apt-get install clang lld # clang-17 lld-17 can be added to automatically install the most recent version of the package.


To install just clang, lld and lldb (17 release):

apt-get install clang-17 lldb-17 lld-17


To install all key packages:

# LLVM
apt-get install libllvm-17-ocaml-dev libllvm17 llvm-17 llvm-17-dev llvm-17-doc llvm-17-examples llvm-17-runtime
# Clang and co
apt-get install clang-17 clang-tools-17 clang-17-doc libclang-common-17-dev libclang-17-dev libclang1-17 clang-format-17 python3-clang-17 clangd-17 clang-tidy-17
# compiler-rt
apt-get install libclang-rt-17-dev
# polly
apt-get install libpolly-17-dev
# libfuzzer
apt-get install libfuzzer-17-dev
# lldb
apt-get install lldb-17
# lld (linker)
apt-get install lld-17
# libc++
apt-get install libc++-17-dev libc++abi-17-dev
# OpenMP
apt-get install libomp-17-dev
# libclc
apt-get install libclc-17-dev
# libunwind
apt-get install libunwind-17-dev
# mlir
apt-get install libmlir-17-dev mlir-17-tools
# bolt
apt-get install libbolt-17-dev bolt-17
# flang
apt-get install flang-17
# wasm support
apt-get install libclang-rt-17-dev-wasm32 libclang-rt-17-dev-wasm64 libc++-17-dev-wasm32 libc++abi-17-dev-wasm32 libclang-rt-17-dev-wasm32 libclang-rt-17-dev-wasm64

Verification using sigstore
Source, Debian tarballs and dsc files can be verified using sigstore/rekor.
This can be done with "rekor verify":

file="llvm-toolchain-10_10.0.1~%2b%2b20210327072807%2bef32c611aa21-1~exp1~20210327183412.212.dsc"
url="https://apt.llvm.org/unstable/pool/main/l/llvm-toolchain-10/$file"
sig_file="$url.asc"
wget --quiet https://apt.llvm.org/sigstore.public.key
./rekor verify --rekor_server https://rekor.sigstore.dev --signature $sig_file --public-key sigstore.public.key --artifact $url
echo $?


Or with "rekor search":

file="llvm-toolchain-10_10.0.1~++20210327072807+ef32c611aa21.orig.tar.xz"
url="https://apt.llvm.org/unstable/pool/main/l/llvm-toolchain-10/$file"
wget --quiet $url
sha=$(sha256sum $file|awk '{print $1}')
./rekor search --sha sha256:$sha --rekor_server https://rekor.sigstore.dev

Technical aspects
Packages are rebuilt against the trunk of the various LLVM projects.
They are rebuild through a Jenkins instance:
https://llvm-jenkins.debian.net

Bugs

Bugs should be reported on the LLVM bug tracker (label: packaging).

Workflow

Twice a day, each jenkins job will checkout the debian/ directory necessary to build the packages. The repository is available on the Debian hosting infrastructure: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/.
Sources of this page, llvm.sh and others scripts are available on github:
https://github.com/opencollab/llvm-jenkins.debian.net/
In the llvm-toolchain-*-source, the following tasks will be performed: Then, the job llvm-toolchain-X-binary will: Note that a few patches are applied over the LLVM tarballs (and should be merged upstream at some point).
Extra
With the Jenkins instance, several reports are produced:
Building the latest nightly snapshot
Building LLVM packages from source is documented in a dedicated page.

Contact: Sylvestre Ledru
Build infra by IRILL / Hosting by LLVM Foundation / CDN by Fastly