Skip to content

Commit 4994d3e

Browse files
authored
fix: install aarch64-apple-darwin toolchain on x86 (#421)
We always create universal binaries when compiling on x86. This means that the aarch64-apple-darwin also needs to be installed. Install that toolchain automatically if it doesn't exist yet. This change has also been tested for the case when the toolchain already exists. In that case it just reports: info: component 'rust-std' for target 'aarch64-apple-darwin' is up to date Thanks @lanzafame for reporting this issue.
1 parent dc80a05 commit 4994d3e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.circleci/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ jobs:
103103
- prepare:
104104
linux: false
105105
darwin: true
106-
- run: cd rust && rustup target add aarch64-apple-darwin
107106
- run: cd rust && cargo fetch
108107
- run: cd rust && cargo install cargo-lipo
109108
- build_project

install-filcrypto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ build_from_source() {
163163
# Note that the cross compile works on x86_64 for m1, but doesn't work on m1.
164164
# For m1, we will build natively if building from source.
165165
if [ "$(uname -s)" = "Darwin" ] && [ "$(uname -m)" = "x86_64" ]; then
166+
# Rustup only installs the correct versions for the current
167+
# architecture you're on. As we cross-compile to aarch64, we need to
168+
# make sure that toolchain is installes as well.
169+
rustup target add aarch64-apple-darwin
166170
build="lipo"
167171
additional_flags="--targets x86_64-apple-darwin,aarch64-apple-darwin "
168172
else

0 commit comments

Comments
 (0)