5 ms·
> This bit code is then used by Apple to convert the application to the specific platform. Which means that Apple can easily make the transition to a different
by madeofpalk 10y ago
> This bit code is then used by Apple to convert the application to the specific platform. Which means that Apple can easily make the transition to a different instruction set, for example, switching from x86 to ARM without all apps need to be resubmitted
My understanding of bitcode is that this is incorrect. The bitcode 'intermediate representation' isnt source code that can just be recompiled into a completely different instruction set. Rather, it's to take advantage of optimisations when there are minor changes in the same arch.
An Intel to ARM switch would still require developers to update and resubmit their apps in order to be compatible.
Edit: As pointed out below, Mac App Store/macOS doesn't even support bitcode, so this entire point is moot.
- pjmlp 10y agoThat is the official LLVM bitcode, which doesn't mean Apple is using their own internal architecture neutral fork.
- madeofpalk 10y agoMy understanding is that still "Apple Bitcode" is not architecture neutral and is not able to be used by Apple to automatically convert Intel apps to ARM. The other part that's missing is that Apple only has Bitcode for Mac apps distributed through the Mac App Store, which leaves out most that people actually use.
- masklinn 10y ago> The other part that's missing is that Apple only has Bitcode for Mac apps distributed through the Mac App Store Does it even have that? As far as I know bitcode is a requirement for watchOS and tvOS, an option (enabled by default) on iOS, I've found no reference to it even existing on MAS/macOS.
- madeofpalk 10y agoAhh haha you're absolutely right - Bitcode doesn't exist for Mac at all, rendering this entire conversation moot.
- pjmlp 10y agoDepends how serious is Apple about closing down the desktop.
- masklinn 10y agoThe strategy of shifting macs to ARM with a closed-up MAS is nonsensical and has no evidence for it. MAS is a graveyard, it would seriously antagonise all existing mac user base, and it's not supported by the article (iOS being XNU-based is a sufficient reason to have ARM references in there). Now if Apple wanted to close up "the desktop" and shift it to ARM, what could/would make sense would be scaling iOS further up from its current position: revive the iBook brand (or create a new brand) as a Chromebook-type laptop on ARM with a new iOS form factor, possibly with a touch-enabled display or as a convertible. That would be a relatively natural extension of the iPad Pro concept, would have precedent in the aforementioned Chromebooks, and could provide an acceptable entry-level (sub-$1000) laptop replacement to the 11" Air, at least for students and the like. It could even have a cellular option.
- pjmlp 10y agoThis is the future of Macs, who thinks otherwise will be surprised, https://www.youtube.com/watch?v=1zPYW6Ipgok https://www.youtube.com/watch?v=1zPYW6Ipgok
- izacus 10y agoThen again, Apple has a history of doing things in ways that were nonsensical and antagonising to some people before (no apps on iPhone, no phone plug, reviewed apps only on iOS AppStore, etc. etc.). I'm not sure why moving to MAS only software on desktop OS would be such a stretch of imagination on ARM MacBooks?
- masklinn 10y ago> That is the official LLVM bitcode, which doesn't mean Apple is using their own internal architecture neutral fork. Where would it live? The bitcode uploaded to the AppStore is the one produced by the local toolchain, AFAIK there's no evidence that it's a fork with its own custom platform-independent bitcode. The point of bitcode is that Apple can the compile separate packages for ARM32 and ARM64 devices, can easily drop ARM32, and can eventually migrate Watch software to ARM64 without involving developers (hence bitcode being required for WatchOS and tvOS, but optional for iOS). It also lets them perform higher-level static validation of software, or add new transformation/optimisation passes. Incidentally, the whole thing is irrelevant because bitcode is an appstore feature, I've found no reference to it being used for MAS.
- pjmlp 10y agoApple toolchain is not the same you download from llvm.org.
- masklinn 10y agoWhich completely misses the point, Apple's toolchain is machine-local, it can be inspected, so can the compiled bitcode package, and in the year since bitcode was released (and mandated for watchOS and tvOS) nobody has reported anything which would distinguish it from LLVM's bitcode. And again the whole discussion is nonsensical considering bitcode is an appstore thing, MAS doesn't use it, it's not a thing on macOS at all.
- pjmlp 10y agoSo you know more than anyone else what is going on Apple walls? I don't, so it makes sense to speculate. Nothing prevents Apple to make the MAS a requirement for thr desktop as well.
- madeofpalk 10y ago> Nothing prevents Apple to make the MAS a requirement for thr desktop as well. Except they haven't because the market and plenty of other realities prevent them from doing this.
- bluejekyll 10y agoWhile the conversation is moot, I have tried to use bitcode to target multiple Apple targets. You are correct that bitcode is architecture specific. This makes sense if you start thinking about endianness and how instructions are generated. Inaddition to that, even the default platform address size, e.g. 64 or 32 bit, needs to be encoded. In fact Apples requirement for submitting bitcode for tvOS and watchOS confounds me, b/c as far as I can tell it only gives them a minor set of instructions that they can actually change. Then on top of that it locks you into their toolchain, see this discussion on Rust around this: https://users.rust-lang.org/t/ios-rust-integration/6928/2 https://users.rust-lang.org/t/ios-rust-integration/6928/2
- coldtea 10y ago>Inaddition to that, even the default platform address size, e.g. 64 or 32 bit, needs to be encoded. Isn't that moot, as all platforms used by Apple are 64-bit by now?
- bluejekyll 10y agoI was talking more generally about bitcode limitations. Maybe one day central CPUs will become 128 bits, it would be neat if you could just recompile the bitcode, but that won't work.
- fulafel 10y agoThere's an architecture neutral close relative to LLVM bitcode: Google's PNaCl. "PNaCl bitcode is based to a large extent on LLVM IR as of version 3.3" (https://developer.chrome.com/native-client/reference/pnacl-bitcode-abi https://developer.chrome.com/native-client/reference/pnacl-b...) It's targeting x86, amd64, arm and mips and shipping for a good while. Seems a bit quiet lately though.