We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e563b8 commit 6b3ada0Copy full SHA for 6b3ada0
build_system/rustc_info.rs
@@ -2,19 +2,13 @@ use std::path::{Path, PathBuf};
2
use std::process::{Command, Stdio};
3
4
pub(crate) fn get_host_triple(rustc: &Path) -> String {
5
- let version_info =
6
- Command::new(rustc).stderr(Stdio::inherit()).args(&["-vV"]).output().unwrap().stdout;
7
- String::from_utf8(version_info)
8
- .unwrap()
9
- .lines()
10
- .to_owned()
11
- .find(|line| line.starts_with("host"))
12
13
- .split(":")
14
- .nth(1)
+ let version_info = Command::new(rustc)
+ .stderr(Stdio::inherit())
+ .args(&["--print", "host-tuple"])
+ .output()
15
.unwrap()
16
- .trim()
17
+ .stdout;
+ String::from_utf8(version_info).unwrap().trim().to_owned()
18
}
19
20
pub(crate) fn get_toolchain_name() -> String {
0 commit comments