Project:LLVM/Releases
LLVM release cycle
LLVM follows a biannual major release cycle. Every six months a new major release is branched out. After a few RCs, x.0.0 release is made. Afterwards, fixes are collected for a bugfix release. Again, after a few RCs x.0.1 release is made.
Handling LLVM releases
New release branches
When upstream creates a new release branch (e.g. release/20.x
), main becomes the next major version. We need to update the live ebuilds for that, that is:
- Update
_LLVM_MAIN_MAJOR
inllvm.org.eclass
to the new major version (e.g. 21). This will switch all existing20.0.0.9999
to therelease/20.x
branch. - Update
_LLVM_KNOWN_SLOTS
inllvm.eclass
- Bump the live ebuilds for the new main version (e.g. copy
*-20.0.0.9999
to*-21.0.0.9999
(sys-devel/llvmgold
and alike from20
to21
).
Release candidates
Once upstream starts tagging RCs, create unkeyworded ebuilds for them:
- Copy the old live ebuilds into
_rcN
ebuilds and the eclass handles the rest (e.g.13.0.0.9999
to13.0.0_rc1
). - Remove the live ebuilds for the old branch at some point.
Final releases
The process is pretty much the same as for RCs. The only differences are:
- Ebuilds get regular
~arch
keywords. - Copy generated manpages from
sys-devel/llvm
andsys-devel/clang
to a dist tarball, and switch the ebuild toLLVM_MANPAGES=pregenerated
.
Example
Patchset
Generally, try to get things backported upstream for as long as new bugfix releases are made. Go for patchsets when they no longer happen, or you have an urgent fix.
user $
git remote add upstream https://github.com/llvm/llvm-project
user $
git fetch --all --tags
user $
# Assuming current version is 19.1.0 and we're bumping to 19.1.1
user $
# Only if there are existing patches, otherwise use llvmorg-19.1.1 directly
user $
git checkout gentoo-19.1.0
user $
git rebase llvmorg-19.1.1
user $
# Make any relevant cherry-picks / backports which are missing upstream (hopefully none!)
user $
# If you do, remember to add a Gentoo-Component trailer to the commit message!
user $
# git cherry-pick -x ...
user $
llvm-patchset 19.1.1
Ebuilds
Bump the ebuilds:
user $
# Enter git repository
user $
cd ~/git/gentoo
user $
# Run llvm-foreach-pkg (from mgorny-dev-scripts)
user $
git add -A
user $
# Update LLVM_PATCHSET in each of the ebuilds
user $
pkgdev manifest --if-modified
user $
llvm-foreach-pkg pkgcommit -sS . -m "Bump to 19.1.1"
Manpages
Normally, manpages are built using Sphinx. However, to lighten the dependencies for release versions, we provide pregenerated tarballs. We generally generate them at the first final release, and update only if they change.
Roughly, the process is:
- Fetch the last manpages tarball for comparison.
- Build LLVM and Clang to get new manpages generated and installed.
- Unpack the tarball, update directory names, replace the manpages (note that a few manpages aren't generated by Sphinx, e.g. scan-build — we don't ship these).
- Repack, upload and update LLVM_MANPAGE_DIST list in llvm.org.eclass.