Skip to content

Commit 9f40467

Browse files
authored
Merge pull request #3052 from zhaixiaojuan/master
Add support for loongarch64
2 parents ab648dc + 7418a53 commit 9f40467

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

rustup-init.sh

+3
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,9 @@ get_architecture() {
370370
riscv64)
371371
_cputype=riscv64gc
372372
;;
373+
loongarch64)
374+
_cputype=loongarch64
375+
;;
373376
*)
374377
err "unknown CPU type: $_cputype"
375378

src/dist/triple.rs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ static LIST_ARCHS: &[&str] = &[
2222
"powerpc64le",
2323
"riscv64gc",
2424
"s390x",
25+
"loongarch64",
2526
];
2627
static LIST_OSES: &[&str] = &[
2728
"pc-windows",

src/test.rs

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ pub fn this_host_triple() -> String {
9999
"riscv64gc"
100100
} else if cfg!(target_arch = "aarch64") {
101101
"aarch64"
102+
} else if cfg!(target_arch = "loongarch64") {
103+
"loongarch64"
102104
} else {
103105
unimplemented!()
104106
};

0 commit comments

Comments
 (0)