3 ms·
The Go compiler doesn't use LLVM. They pretty much built all their codegen for every platform from the ground up. But that's only possible because they have the
by TUSF 4y ago
The Go compiler doesn't use LLVM. They pretty much built all their codegen for every platform from the ground up. But that's only possible because they have the resources to do that. As far as I know, the only viable alternative to LLVM, is GCC, which I don't think is "lighter".
Also, Zig still uses LLVM. It's just that because LLVM is C++, the Stage 1 compiler had to be in C++ as well, and they've since slimmed it down by having LLVM expose a C API that the (now "self-hosted") Zig compiler can directly talk to instead.
- stealthcat 4y agoReally, last time I read there’s zig compiler flag to not use LLVM at all (but not all features supported yet)
- TUSF 4y agoOk, it seems you're right. There is a flag for preventing the use of LLVM, and using a native backend for codegen, although without all the optimizations and such that LLVM has.