Skip to content

Commit 8b605be

Browse files
authored
Merge pull request #2275 from Kobzol/windows-support
Fix Windows support
2 parents 7ec95c0 + dcaa27c commit 8b605be

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

collector/src/bin/collector.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -794,9 +794,10 @@ fn main_result() -> anyhow::Result<i32> {
794794
runtime: &runtime_benchmark_dir,
795795
};
796796

797-
// This clearly won't work for all architectures, but should be good enough for x64 Linux
798-
// and ARM 64-bit Linux.
799-
let host_target_tuple = format!("{}-unknown-linux-gnu", std::env::consts::ARCH);
797+
let host_target_tuple =
798+
String::from_utf8(command_output(Command::new("rustc").arg("--print=host-tuple"))?.stdout)?
799+
.trim()
800+
.to_string();
800801

801802
match args.command {
802803
Commands::BinaryStats { mode, symbols } => {

0 commit comments

Comments
 (0)