4 ms·
Uhhhhh IIRC rust uses llvm under the hood so ... Change the back end and you are good?
by jfbfkdnxbdkdb 2y ago
Uhhhhh IIRC rust uses llvm under the hood so ... Change the back end and you are good?
- rcxdude 2y agoThere are some platforms which linux supports that LLVM does not (and GCC does). There is quite a lot of effort in making a decent LLVM backend, and these older systems tend to have relatively few maintainers, so there may not be the resources to make it happen.
- dannymi 2y agoThen use the GCC backend. https://github.com/rust-lang/rustc_codegen_gcc https://github.com/rust-lang/rustc_codegen_gcc
- ddtaylor 2y agoAren't those already situations we use cross compiler for?
- Filligree 2y agoA cross compiler is just compiler backend for machine X running on machine Y. You still need the backend.
- Pet_Ant 2y ago> There is quite a lot of effort in making a decent LLVM backend, and these older systems tend to have relatively few maintainers Well, it also takes effort to be held back with outdated tools. Also, the LLVM backend doesn't have to be top-notch, just runnable. If they want to run legacy hardware they should be okay with running a legacy or taking the performance hit of a weaker LLVM back-end. Realistically At version 16[1], LLVM supports: * IA-32 * x86-64 * ARM * Qualcomm Hexagon * LoongArch * M68K * MIPS * PowerPC * SPARC * z/Architecture * XCore * others in the past it had support for Cell and Alpha, but I'm sure that the old code could be revived if needed, so how many users are effected here? Lets not forget the Linux dropped Itanium support and I'm sure someone is still running that somewhere. Looking through this list [2], what I see missing is Elbrus, PA-RISC, OpenRisc, and SuperH. So pretty niche stuff. [1] https://en.wikipedia.org/wiki/LLVM#Backends https://en.wikipedia.org/wiki/LLVM#Backends [2] https://en.wikipedia.org/wiki/List_of_Linux-supported_computer_architectures https://en.wikipedia.org/wiki/List_of_Linux-supported_comput...