Closed XAMPPRocky closed 3 years ago
I think LLVM-CBE just uses LLVM's facilities for reading LLVM IR, so if there's a problem reading some IR it's unlikely to be its fault. Are you perhaps using mismatched LLVM versions between Rust and LLVM-CBE?
Yep, you're right. I was trying to use CBE compiled with LLVM 10 with output from LLVM 12. I've tried building CBE with LLVM 12 but ran into other issues. https://github.com/JuliaComputingOSS/llvm-cbe/issues/116
LLVM does provide some backwards compatibility, but it only works for consuming older versions' output with newer versions, not the other way around. (By the way, the guarantees are stronger for bitcode rather than the textual form.)
Would it be an option to use an older version of Rust?
Would it be an option to use an older version of Rust?
Definitely, you could also build the latest version with an older LLVM. That just takes a long time (hours to build rustc) so I was testing with the defaults.
Another attempt at compiling Rustc generated LLVM IR. This time with a library compiled to WebAssembly.
Error