Last active
May 10, 2024 13:11
-
-
Save HirbodBehnam/cd9b21e4879e1fa800f7972982b83afd to your computer and use it in GitHub Desktop.
The Cargo config file I use for cross compiling
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
# Place this file as $CARGO_HOME/config.toml | |
# Run this command before compiling anything to install compilers | |
# apt install apt install gcc-x86-64-linux-gnu gcc-aarch64-linux-gnu gcc-mingw-w64 | |
[target.x86_64-unknown-linux-musl] | |
linker = "rust-lld" | |
[target.aarch64-unknown-linux-musl] | |
linker = "rust-lld" | |
[target.x86_64-unknown-linux-gnu] | |
linker = "x86_64-linux-gnu-gcc" | |
[target.aarch64-unknown-linux-gnu] | |
linker = "aarch64-linux-gnu-gcc" | |
[target.x86_64-pc-windows-gnu] | |
linker = "x86_64-w64-mingw32-gcc" | |
[target.i686-pc-windows-gnu] | |
linker = "i686-w64-mingw32-gcc" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment