diff options
| author | kit <kit@hastur.io> | 2021-08-16 13:02:24 +1000 |
|---|---|---|
| committer | kit <kit@hastur.io> | 2021-08-16 15:04:58 +1000 |
| commit | 79e402e9e0e87a5e5a174c012dfded53dec85769 (patch) | |
| tree | 9d29ccac792574d007fea47c7ba9083e8e3b77c3 /src/test/debuginfo/enum-thinlto.rs | |
| parent | 2a6fb9a4c0e5ca7a81999065943b211c226fe9d8 (diff) | |
| download | rust-79e402e9e0e87a5e5a174c012dfded53dec85769.tar.gz rust-79e402e9e0e87a5e5a174c012dfded53dec85769.zip | |
Allow the iOS toolchain to be built on Linux
The iOS toolchain can be built on Linux with minor changes. The
compilation will invoke `xcrun` to find the path to the iPhone SDK but
a fake `xcrun` executable can be used.
```
#!/bin/sh
echo "/path/to/sdk"
```
The iOS toolchain can then be built and linked with rustup.
```
$ ./x.py build --stage 2 --host x86_64-unknown-linux-gnu \
--target aarch64-apple-ios
$ rustup toolchain link stage1 build/x86_64-unknown-linux-gnu/stage1
```
It's possible to take this toolchain and compile an iOS executable
with it. This requires the ld64 linker and an iOS SDK. The ld64 linker
can be taken from
[cctools](https://github.com/tpoechtrager/cctools-port). A project's
.cargo/config can then be edited to use the linker for this target.
```
[target.aarch64-apple-ios]
linker = "/path/to/cctools/bin/arm-apple-darwin-ld"
rustflags = [
"-C",
"""
link-args=
-F/path/to/sdk/System/Library/Frameworks
-L/path/to/sdk/usr/lib
-L/path/to/sdk/usr/lib/system/
-adhoc_codesign
""",
]
```
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
