Skip to content

Commit

Permalink
Update src/toolchain/export-mac-and-ios.md
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Haller <[email protected]>
  • Loading branch information
Ughuuu and Bromeon committed Jun 29, 2024
1 parent a7b2e93 commit 81e1232
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/toolchain/export-mac-and-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ cargo build --target=aarch64-apple-darwin --release
Run the [lipo](https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary) tool to merge the two in one universal library.

```sh
lipo -create -output target/release/libmy_lib.macos.dylib target/aarch64-apple-darwin/release/libmy_lib.dylib target/x86_64-apple-darwin/release/libmy_lib.dylib
lipo -create -output target/release/lib{YourCrate}.macos.dylib \
target/aarch64-apple-darwin/release/lib{YourCrate}.dylib \
target/x86_64-apple-darwin/release/lib{YourCrate}.dylib
```

The result of this will be the file `target/release/libmy_lib.macos.dylib` that will now have support for both x64 and arm64 platforms.
Expand Down

0 comments on commit 81e1232

Please sign in to comment.