Hacker News new | ask | show | jobs
by ithkuil 1262 days ago
Can you do whatever Go does? IIRC Go can crosscompile without requiring any xcode component.

Or you literally mean that you don't want to do it because of ideological reasons regardless of the aforementioned technical argument?

1 comments

The crosscompilation on Go to mac is pretty limited. That's why I wrote "need to reach dependencies beyond what libc offers". If you crosscompile Go from Linux to mac, you'll actually get a different binary than if you compile on mac natively (DNS resolution will use Go's home baked version instead of the one provided by the OS). CGo also doesn't work if you crosscompile.

It's a bunch of work to even get a hobbled version of crosscompilation to macOS running.

Yeah the DNS resolution issue without cgo is quite a hassle.

Luckily this should be solved in 1.20

https://go-review.googlesource.com/c/go/+/446178/