Skip to content

Commit e84116a

Browse files
committed
Add riscv64gc-unknown-linux-gnu support
1 parent 0602a72 commit e84116a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

rustup-init.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,9 @@ get_architecture() {
295295
s390x)
296296
_cputype=s390x
297297
;;
298-
298+
riscv64)
299+
_cputype=riscv64gc
300+
;;
299301
*)
300302
err "unknown CPU type: $_cputype"
301303

@@ -321,6 +323,9 @@ get_architecture() {
321323
_ostype="${_ostype}eabihf"
322324
fi
323325
;;
326+
riscv64gc)
327+
err "riscv64 with 32-bit userland unsupported"
328+
;;
324329
esac
325330
fi
326331

src/dist/dist.rs

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ static LIST_ARCHS: &[&str] = &[
9090
"powerpc",
9191
"powerpc64",
9292
"powerpc64le",
93+
"riscv64gc",
9394
"s390x",
9495
];
9596
static LIST_OSES: &[&str] = &[

tests/mock/clitools.rs

+2
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,8 @@ pub fn this_host_triple() -> String {
980980
"i686"
981981
} else if cfg!(target_arch = "x86_64") {
982982
"x86_64"
983+
} else if cfg!(target_arch = "riscv64") {
984+
"riscv64gc"
983985
} else {
984986
unimplemented!()
985987
};

0 commit comments

Comments
 (0)