Forked from shqld/cargo_x86_64-unknown-linux-gnu-on-m1-mac.sh
Created
March 9, 2023 12:38
-
-
Save horizon0514/db39cabb3ea7ec9f1cbdbd886ef352b6 to your computer and use it in GitHub Desktop.
cargo build for the target x86_64-unknown-linux-gnu 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 x86_64-unknown-linux-gnu | |
export CC_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-gcc | |
export CXX_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-g++ | |
export AR_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-ar | |
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc | |
rustup target add x86_64-unknown-linux-gnu | |
cargo build --target x86_64-unknown-linux-gnu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
对某些库,可能需要安装