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/13.x
), main becomes the next major version. We need to update the live ebuilds for that, that is:
- Update
_LLVM_MASTER_MAJOR
inllvm.org.eclass
to the new major version (e.g. 14). This will switch all existing13.0.0.9999
to therelease/13.x
branch. - Update
_LLVM_KNOWN_SLOTS
inllvm.eclass
- Bump the live ebuilds for the new main version (e.g. copy
*-13.0.0.9999
to*-14.0.0.9999
(sys-devel/llvmgold
from13
to14
.
Release candidates
Once upstream starts tagging RCs, create unkeyworded ebuilds for them:
- Clone the https://gitweb.gentoo.org/fork/llvm-project.git/ repository, select the latest
gentoo*
tag, fetch from upstream, rebase against upstream release tag and release the patchset.
- Copy the old live ebuilds into
_rcN
ebuilds and the eclass handles the rest (e.g.13.0.0.9999
to13.0.0_rc1
).
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
.
x.0.1 release
Upstream generally makes one bugfix release to each major version. Once x.0.1 final is packaged, you can remove the corresponding live ebuilds.
Example
Patchset
user $
git remote add upstream https://github.com/llvm/llvm-project
user $
git fetch --all --tags
user $
# Assuming current version is 14.0.0 and we're bumping to 14.0.1
user $
git checkout gentoo-14.0.0
user $
git rebase llvmorg-14.0.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 $
# Create the patchset tarball (from mgorny-dev-scripts)
user $
llvm-patchset 14.0.1
Ebuilds
Bump the ebuilds generically:
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 $
llvm-foreach-pkg pkgdev manifest
user $
llvm-foreach-pkg pkgcommit -sS . -m "Bump to 14.0.1"
Do not push yet. Generate the man pages tarball by building LLVM with man page generation enabled:
user $
ebuild sys-devel/llvm/llvm-14.0.1.ebuild clean install
user $
# Copy the man pages out
user $
mkdir -p /tmp/llvm-manpages/{clang,llvm} && cd /tmp/llvm-manpages
user $
mv /var/tmp/portage/sys-devel/llvm-14.0.1/work/llvm-14.0.1_build-abi_x86_64.amd64/docs/man/* /tmp/llvm-manpages/llvm/
user $
# Ditto Clang
user $
ebuild sys-devel/clang/clang-14.0.1.ebuild clean install
user $
# Copy the man pages out
user $
mv /var/tmp/portage/sys-devel/clang-14.0.1/work/x/y/clang-abi_x86_64.amd64/docs/* /tmp/llvm-manpages/clang/