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)