There’s an ongoing discussion about reducing the number LLVM versions that the compiler supports. With some recent progress on removing internal blockers, we might move on with this for the next release 1.23 (scheduled for January 2027).
opened 12:31PM - 07 Sep 26 UTC
status:discussion
topic:stdlib:llvm
It's been a while since we last removed support for old LLVM releases in https:/… /github.com/crystal-lang/crystal/pull/12906.
In the previous discussion (#8725), @ysbaddaden suggested some guidelines on LLVM support in https://github.com/crystal-lang/crystal/issues/8725#issuecomment-582355614
> I don't think sticking to a fixed rule such as "we support the last N releases of LLVM" is a good idea. It's IMO better to see which versions are widely available, and which LLVM versions are providing what we need, and the cost of maintaining support for older releases. The LLVM C API isn't breaking that much anymore, and most of our C++ extensions is now available in the official C API since LLVM 7 (DIBuilder, Atomics).
Practical benefits that some LLVM versions would bring in terms of code cleanup:
- LLVM 9: Simplified ASM for context switch
- LLVM 15: Opaque pointers
- LLVM 18: Obsolete `llvm_ext`
We currently use:
- LLVM CI: LLVM 13-23
- Dockerfiles: LLVM 22
- Windows CI: LLVM 20
- `shell.nix`: LLVM 16
- distribution scripts macOS: LLVM 15
Supported versions by oldest distros with regular support:
- Ubuntu 22.04 LTS (EOL 2027-06-01): LLVM 15
- Debian 13 (2028-08-09): LLVM 19 (LLVM 21 in backports)
- Fedora 21 (2026-12-06): LLVM 21
It seems very reasonable to drop support below LLVM 15 (i.e. LLVM 8-14).
Ideally even more, but that requires updating our own builds (#16397, https://github.com/crystal-lang/distribution-scripts/issues/280).
We should also consider adopting a general LLVM support policy.
For reference, Rust supports the current development version, the latest released major version, and one or two preceding major versions on a best-effort basis (https://rustc-dev-guide.rust-lang.org/backend/updating-llvm.html).
Crystal currently supports 16 major versions.
---
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/crystal-lang/crystal/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc
Currently, we’re supporting 18 major LLVM versions, down to 8.0. Many other compilers like Rust support only the most recent one or two versions.
We’re not yet sure about the exact cut. But it’s likely we’ll drop at least everything below 18, which would bring a major gain (retire llvm_ext).
And we’ll likely implement a general LLVM support policy to have clarity for future expectations.
Since this affects efforts and abilities of downstream packages, input from package maintainer’s is much appreciated.
dch
November 6, 2026, 2:26pm
2
Based on your advice, I re-rolled the FreeBSD bootstrap to 1.22.2 and off LLVM20. So we should be ready for future support without issue.