2 ms·
> The primary goal of this is support for old/obscure hardware with no LLVM/GCC support Wouldn't it be easier to add old hardware support to LLVM/GCC instead?
by ivanjermakov 3mo ago
> The primary goal of this is support for old/obscure hardware with no LLVM/GCC support
Wouldn't it be easier to add old hardware support to LLVM/GCC instead? I adore the project scale and determination, but for this goal extending existing projects seems more logical than building a language translator.
- claudex 3mo agoSome architecture lacks documentation, if you have a working C compiler, it's easier to use it than working on a compiler to target it.
- Liquid_Fire 3mo agoPresumably you still need a C++ compiler for LLVM itself though. Or... a C++ to C translator. Edit: On second thought, that's only needed if you want to run rustc itself on the old hardware, which is probably not super useful given the main reason you would need to do this is if LLVM can't target that hardware. For building code written in Rust for such old hardware, this would be sufficient.
- Perz1val 3mo ago> Wouldn't it be easier to add old hardware support to LLVM/GCC instead? No, in fact it's much, much harded. You have no idea of the scope. I have no idea of the scope. Nobody does. There are obscure machines we've never heard about and there are C compilers for them. Targeting and supporting them from modern toolchains is a fool's errand.
- jitl 3mo agorust to c supports infinite platforms that already have a c compiler by implementing a single rust to c program on the other hand, porting llvm to an infinite number of platforms requires an infinite amount of work so, it is less work this way