I'd love to make progress on the bitcode problem. It's pretty crucial for our cross-platform story. But it's also a nightmare.
It's probably impossible for Rust to get its LLVM fork onto the same merge-base as Apple's clang's - it's just not practical for us to be shackled to their whims.
I see a few paths to emitting Apple's bitcode from rustc:
- We ship an entirely separate toolchain for targetting Apple bitcode. This is quite ugly.
- We change rustc to dynamically load LLVM, create a rust-llvm package and an optional rust-llvm-apple package, and have rustc load the apple LLVM to deal with their bitcode.
- We create a rustc_llvm_apple crate and just link two entire LLVMs into rustc at all times. This probably would not fly
- We create a build of rustc called rustc-apple and ship it in an optional rustc-apple package. It is exactly like rustc except instead of linking to rustc_llvm it links to rustc_llvm_apple. When rustc gets a request to emit bitcode it just defers completely to the rustc-apple binary. I actually fancy this solution quite a bit.