Skip to content

Conversation

HertzDevil
Copy link
Contributor

Currently, Crystal waits until a new stable major version of LLVM is released before that version is declared in src/llvm/ext/llvm-versions.txt, the list of supported LLVM versions. This has proved to be a hassle when maintaining Crystal on software repositories that only distribute the latest versions of each package; LLVM x.1 is often scheduled half to a whole month before a corresponding Crystal 1.y release, during which either Crystal does not run at all (LLVM could use versioned library names), or someone has to explicitly backport LLVM support on our master branch to a preceding Crystal package.

With this PR, Crystal now supports the latest LLVM development branch explicitly, in the hopes that unattended transitions from LLVM x.0 to x.1 are smooth. This also means Crystal is now responsible for tracking any upstream LLVM changes as soon as possible.

@straight-shoota
Copy link
Member

With this change we should also add a test against LLVM's development branch to LLVM CI.

@straight-shoota straight-shoota modified the milestone: 1.17.0 May 13, 2025
@HertzDevil
Copy link
Contributor Author

We have not been escaping our strings properly. The Crystal code a = "\\" will produce the LLVM symbol @"'\\'", which itself must be escaped properly since different assemblers handle improperly escaped ones differently. It seems this is fixed in llvm/llvm-project#138817, and now b = "\\\\" would cause a symbol conflict.

@straight-shoota straight-shoota added this to the 1.17.0 milestone May 19, 2025
@straight-shoota straight-shoota merged commit 655e7e4 into crystal-lang:master May 20, 2025
44 checks passed
@HertzDevil HertzDevil deleted the feature/llvm-21.0 branch May 20, 2025 07:27
straight-shoota added a commit to straight-shoota/crystal-book that referenced this pull request Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants