Commit d135d34
committed
Problem: App Store rejects app containing Rust with bitcode error
There is a python program used by Apple (included inside the Xcode.app bundle)
which verifies a program's bitcode as part of rebuilding it. It includes a
check that each bitcode object has valid clang parameters included as part of
its XML xar header.
The Rust compiler sensibly chooses not to emit any clang parameters, since it
is not clang. Unfortunately this means any Rust-emitted bitcode will not pass
app store verification.
Locally, it produces an error like this one:
```
error: Clang option verification failed for bitcode 0038 (argument -emit-obj is
required)
```
Through App Connect, it produces an error like this one:
```
ITMS-90562: Invalid Bundle - The app cannot be processed because options not
allowed to be embedded in bitcode are detected in the submission
```
Solution: Patch Rust so that it will embed exactly the same clang cmdline that
Xcode/clang will when emitting Bitcode.
This patch is relatively brittle and not upstreamable in this form, but it
serves well to demonstrate the problem and is likely to be a workable solution
for now for anyone who wants to ship code.1 parent 9a72808 commit d135d34
3 files changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments