I get that Apple has its own BS reasons for that, but Linux?
I get that Apple has its own BS reasons for that, but Linux?
Because that's the path of least resistance in terms of development, at least unless you need to industrially build for many architectures. If the compiler runs on $ARCH, the output runs on $ARCH, I guess there's some exception but it's that, an exception.
> Unless the build includes tests
Build should indeed include tests, unless you want to ship software that potentially fails in architectures you claim to support.
Cross compiling isn't a first class citizen in many languages, and when it is, cross testing usually isn't, but you can have a toolchain that includes qemu (as a vm or as a dynamic binary translator) to cover those cases.
Containers make this a ton easier of course but then you’re building in a container and you probably wanna make that container match your target environment, soooo…
Another option is to use Qemu and binfmt_misc - that way you do get the result of "native" compilation, but it's slow.