Project:LLVM/Releases

From Gentoo Wiki
Jump to:navigation Jump to:search

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:

  1. Update _LLVM_MAIN_MAJOR in llvm.org.eclass to the new major version (e.g. 21). This will switch all existing 20.0.0.9999 to the release/20.x branch.
  2. Update _LLVM_KNOWN_SLOTS in llvm.eclass
  3. 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 from 20 to 21).

Release candidates

Once upstream starts tagging RCs, create unkeyworded ebuilds for them:

  1. Copy the old live ebuilds into _rcN ebuilds and the eclass handles the rest (e.g. 13.0.0.9999 to 13.0.0_rc1).
  2. 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:

  1. Ebuilds get regular ~arch keywords.
  2. Copy generated manpages from sys-devel/llvm and sys-devel/clang to a dist tarball, and switch the ebuild to LLVM_MANPAGES=pregenerated.

Example

Patchset

Note
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:

  1. Fetch the last manpages tarball for comparison.
  2. Build LLVM and Clang to get new manpages generated and installed.
  3. 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).
  4. Repack, upload and update LLVM_MANPAGE_DIST list in llvm.org.eclass.