rustllvm-ir

How do I find which Rust versions correspond to which specific LLVM version?


I'm writing a compiler in Rust using the llvm-ir crate but it only supports up to LLVM 19.

I need to compile Rust's LLVM IR output using my compiler. But running rustc --version --verbose outputs the relevant information:

release: 1.87.0
LLVM version: 20.1.1

So the version i have installed can't be compiled. So i need a Rust version that uses LLVM 19 or lower.

I tried looking through the Rust Changelogs but i don't see mentions of the LLVM version. I tried looking through some of the source code but i could't make sense of it.

What are the ways for choosing a Rust version based on the LLVM version that they use? Do i look through the source code? Do i use a similar command?


Solution

  • Here are two ways: