Hacker News new | ask | show | jobs
by ori_b 2530 days ago
> i assume the primary use case is to speed up compilation and create smaller binary sizes?

LLVM is going to be much slower than the Go toolchain. It may produce smaller binaries, but mainly through dropping the bulk of the runtime on the floor. The main thing that LLVM does is (apparently) reduce the stack usage.

But it does support the CPUs that the author wants to target out of the box.

1 comments

I believe LLVM toolchains also (by default) exclude debug information, which gc (go compiler) would need to be told to explicitly exclude.
You generally need to run the code through some rewriters that, as far as I recall, drop those symbols anyways -- these CPUs can't execute an elf binary directly from flash.
As a data point, TinyGo includes the debug info by default. There is a "-no-debug" option to turn off the inclusion though.