Last active
March 9, 2022 15:22
-
-
Save shqld/21e78f07efb597181ae5de93e703f8ec to your computer and use it in GitHub Desktop.
cargo build for alpine linux (`aarch64-unknown-linux-musl`) on M1 Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/messense/homebrew-macos-cross-toolchains | |
brew tap messense/macos-cross-toolchains | |
brew install aarch64-unknown-linux-musl | |
export CC_AARCH64_UNKNOWN_LINUX_MUSL=aarch64-unknown-linux-musl-gcc | |
export CXX_AARCH64_UNKNOWN_LINUX_MUSL=aarch64-unknown-linux-musl-g++ | |
export AR_AARCH64_UNKNOWN_LINUX_MUSL=aarch64-unknown-linux-musl-ar | |
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-unknown-linux-musl-gcc | |
rustup target add aarch64-unknown-linux-musl | |
cargo build --target aarch64-unknown-linux-musl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment