Skip to content

Commit 34ab135

Browse files
committed
Updated docs, fixed bug
1 parent 1b8b4dc commit 34ab135

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

Readme.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,30 @@ lipo -create -output target/libtest1.a target/{x86_64-apple-darwin,aarch64-apple
5555
```
5656

5757
Note that we're not including `x86_64-apple-darwin` because a fat binary cannot contain darwing x86_64 and iOS x86_64 together.
58+
59+
# How it works
60+
61+
Tx86_64-he `x86_64-apple-ios-macabi.json` file contains the information that `Xargo` needs to build a custom sysroot to compile your project with.
62+
A sysroot is the `libstd`, `libcore` and so on.
63+
64+
## Cargo.toml
65+
66+
The panic line:
67+
68+
``` toml
69+
[profile.release]
70+
panic = "abort"
71+
```
72+
73+
Seems to be required as `panic_unwind` leads to a failing build.
74+
75+
## Xargo.toml
76+
77+
Just copy the contents verbatim. Otherwise it fails to build `libstd`.
78+
79+
``` toml
80+
std = {features = ["jemalloc"]}
81+
82+
[dependencies]
83+
std = {}
84+
```

make_fat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# lipo together the different architectures into a universal 'fat' file
44
xargo build --target x86_64-apple-ios-macabi --release
55
xargo build --target aarch64-apple-ios --release
6-
lipo -create -output target/libtest1.a target/{x86_64-apple-darwin,aarch64-apple-ios,x86_64-apple-darwin}/release/libtest1.a
6+
lipo -create -output target/libtest1.a target/{aarch64-apple-ios,x86_64-apple-ios-macabi}/release/libtest1.a

0 commit comments

Comments
 (0)