diff --git a/rustup-init.sh b/rustup-init.sh index 717d260e18..fc19b2d6fa 100755 --- a/rustup-init.sh +++ b/rustup-init.sh @@ -370,6 +370,9 @@ get_architecture() { riscv64) _cputype=riscv64gc ;; + loongarch64) + _cputype=loongarch64 + ;; *) err "unknown CPU type: $_cputype" diff --git a/src/dist/triple.rs b/src/dist/triple.rs index 07496bc705..2407b8d579 100644 --- a/src/dist/triple.rs +++ b/src/dist/triple.rs @@ -22,6 +22,7 @@ static LIST_ARCHS: &[&str] = &[ "powerpc64le", "riscv64gc", "s390x", + "loongarch64", ]; static LIST_OSES: &[&str] = &[ "pc-windows", diff --git a/src/test.rs b/src/test.rs index ffba267e15..2ed797ccad 100644 --- a/src/test.rs +++ b/src/test.rs @@ -99,6 +99,8 @@ pub fn this_host_triple() -> String { "riscv64gc" } else if cfg!(target_arch = "aarch64") { "aarch64" + } else if cfg!(target_arch = "loongarch64") { + "loongarch64" } else { unimplemented!() };