Hacker News new | ask | show | jobs
by abalone 3426 days ago
> However, there is one thing I've never seen mentioned - a combined Mac/iOS binary.

Because they're already doing something better. All iOS apps compile to Bitcode, an intermediary representation that can then compile an optimized binary for the target device architecture.[1]

So if there ever were a desire to run iOS apps on Mac, they'd just compile from Bitcode. Having said that, there's explicitly zero desire to do this.

[1] https://developer.apple.com/library/content/documentation/ID...

1 comments

Bitcode allows you to optimize between chip versions with different opcodes, but not different architectures, word sizes, or endianness.

Source: the recent Accidental Tech Podcast that interviewed Chris Lattner.

Ok fine, but the broader App Thinning featureset of the App Store still means they wouldn't do a universal binary. They'd deliver just what the target device needs.
True, but AArch64 vs AMD64 are not so different (64 bits, little endian, probably quite similar ABIs), it is not unthinkable that the same bitcode could target both architectures.