top | item 34228890

(no title)

MStrehovsky | 3 years ago

I want bflat to be able to crosscompile from anything to anything.

Apple's platforms are difficult to crosscompile for - most instructions I've seen that need to reach dependencies beyond what libc offers require one to copy files from an Xcode installation and pray one didn't break EULAs. I don't even know where to start if I want to build from Linux or Windows to target macOS without a mac.

Then there's a philosophical issue that I have where Apple essentially would like everyone to pay up if they want to distribute software that targets their platforms (required code signing, etc.), and breaking backwards compat all the time (essentially treating developers like a resource to be exploited). This practice needs to go away. I know bflat not being available for macOS won't change that, but we need to start somewhere...

discuss

order

ithkuil|3 years 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?

MStrehovsky|3 years ago

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.

jeswin|3 years ago

I agree with what you're saying, and it's of course entirely your call to make.

However, given that a significant percentage of developers are on Macs, this makes bflat a non-option for a large number of use cases. Even if I'm writing a library (and not an app or a service), I can't pick bflat because sooner or later someone will want to target Macs and iOS.

Also, will .Net V8 NativeAOT being able to target Apple Silicon help with the effort?

actionfromafar|3 years ago

Please make it so it can at least compile on a Mac, no need for cross compiling if it's too complicated.