Hacker News new | ask | show | jobs
by anand-bala 2019 days ago
To me, it doesn't seem like it is LLVM doing the heavy-lifting as much as Docker/Podman (which are used through Cross). Maybe I am missing something...

I definitely agree with you that Zig and Go handle cross-compiling much nicer than the workarounds mentioned in this article. Personally, I prefer the cross-compilation mechanics of Zig over Go.

1 comments

With a GCC-based toolchain, you need to build binutils and GCC for each target you need, plus a sysroot with headers and libraries to target.

With LLVM, the same backend and set of tools can target every single platform LLVM supports, and they also ship their binutils equivalents. Thus, rust in this case could probably be also C or C++; the infrastructure is the same. Rust has also the perk of having a nicer build system and tools that do not require you to lose your sanity in order to cross compile something, which is nice.