("i386", "x86"),
("i586", "x86"),
("i686", "x86"),
+ ("loongarch64", "loongarch64"),
("mips", "mips"),
("msp430", "msp430"),
("nvptx64", "nvptx64"),
return os == name;
}
}
- panic!("Cannot determine OS from triple");
+ false
}
-pub fn get_arch(triple: &str) -> &'static str {
+pub fn get_arch(triple: &str) -> &str {
for &(triple_arch, arch) in ARCH_TABLE {
if triple.contains(triple_arch) {
return arch;
}
}
- panic!("Cannot determine Architecture from triple");
+ triple.split('-').nth(0).unwrap()
}
pub fn get_env(triple: &str) -> Option<&str> {