Hi,
At US LLVM 2024, we had a round table discussion about the possibility of an LLVM Long-Term Support release (LLVM LTS), and what it may look like. This RFC continues that discussion.
The roundtable wasn’t recorded, but Tom’s and David’s presentation is excellent for background on releases: https://www.youtube.com/watch?v=HwrQyOQBIpQ, https://llvm.org/devmtg/2024-10/slides/techtalk/Edelsohn-GCC-and-LLVMDevelopment-and-Maintenance.pdf .
First of all, why LTS?
Well, because having LLVM LTS is from “convenient” to “essential” for some toolchain applications. Two good examples are
- building a Linux or BSD distro with LLVM/Clang as the main compiler, and
- building an SDK or a custom compiler on top of LLVM.
Linux or BSD distribution lifecycle spans many years, with 4 years being the usual frequency at which an average user is comfortable upgrading systems. Within those 4 years, distros need a supported compiler for rebuilds. When picking GCC for the distro compiler, this means getting 2 years of support from the GCC community, and then another 2 years of supporting the compiler internally. For LLVM/Clang, that would mean half a year of community support, and then 3.5 years of internal support – significantly more than GCC.
A similar logic goes for SDKs that are distributed to application developers. Sure, some of them upgrade their development environment every month, but many use installed SDK until it breaks – e.g., doesn’t support a new core necessary for the project. Therefore, companies building SDKs on top of LLVM have to invest into internal support of old LLVM versions.
LLVM LTS is about pooling resources to create a good base for the long-term maintenance of LLVM.
Secondly, who will do the LTS work?
At the round table discussion, it quickly became clear that the LLVM community highly values speed of development. This means that the LTS process should not add to the normal development or contribution workflows. This means that no patch author should be required to do more work because their patch is going to be backported to the LTS version. Consequently, the LTS work will need to be staffed by companies / stakeholders interested in LLVM LTS.
Some of the activities I foresee for the LTS include:
- Backporting patches
- Testing individual patches
- Setting up additional buildbot builders
- Monitoring LTS buildbots and investigate regressions
- Managing releases
Lastly, what would LLVM LTS look like?
Um, I don’t know. My first stab at an MVP is this:
- Each LLVM LTS release will be based on a normal LLVM release
- Patches will be backported if they …
- … fix a bug for supported architectures
- … implement a feature critical for “supported projects”
- e.g., hardware errata mitigations
- e.g., security issues mitigations
- Note [1]
- All other patches will NOT be backported
- Supported target architectures
- AArch64 Linux (self-hosting)
- x86_64 Linux (self-hosting)
- Note [2]
- Supported projects
- Linux kernel (latest LTS release)
- Note [3]
- Schedule
- Every 2 years a particular LLVM release is designated as LTS, say LLVM 20
- LLVM upstream community supports LLVM 20 for the first 6 months as per the normal release process.
- Once 6 months are up, the LTS team continues to support LLVM 20 branch for another 24 months.
- LTS overlap with previous LTS is 6 months
So… what do you think?
Notes:
[1] Exact policies for backports are to be decided and refined – please provide ideas and suggestions!
[2] Other architectures are, obviously, candidates for LTS as well, but each supported architecture should have at least one stakeholder willing to provide engineering resources to backport, test, and maintain LLVM LTS releases for that architecture. E.g., Linaro would support AArch64 architecture, and I am optimistic that we can find a couple of stakeholders for x86_64 as well.
[3] “Supported project” is a source base so important that we will backport a new compiler feature [to an otherwise very conservative branch] to fix an issue in it. Or, in other words, these are major projects that the LLVM LTS should always be able to compile for any LTS-supported architecture.