Skip to content

Commit

Permalink
When running a 32-bit rustup on an aarch64 CPU, select a 32-bit toolc…
Browse files Browse the repository at this point in the history
…hain

this mirrors a similar check that exists in rustup-init.sh

fixes rust-lang#3307
  • Loading branch information
alex committed Sep 23, 2023
1 parent d4c6844 commit 9b664f3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/dist/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,13 @@ impl TargetTriple {
(b"Linux", b"arm") => Some("arm-unknown-linux-gnueabi"),
(b"Linux", b"armv7l") => Some("armv7-unknown-linux-gnueabihf"),
(b"Linux", b"armv8l") => Some("armv7-unknown-linux-gnueabihf"),
(b"Linux", b"aarch64") => Some(TRIPLE_AARCH64_UNKNOWN_LINUX),
(b"Linux", b"aarch64") => {
if cfg!(target_pointer_width = "32") {
Some("armv7-unknown-linux-gnueabihf")
} else {
Some(TRIPLE_AARCH64_UNKNOWN_LINUX)
}
}
(b"Darwin", b"x86_64") => Some("x86_64-apple-darwin"),
(b"Darwin", b"i686") => Some("i686-apple-darwin"),
(b"FreeBSD", b"x86_64") => Some("x86_64-unknown-freebsd"),
Expand Down

0 comments on commit 9b664f3

Please sign in to comment.