difftreelog
fix only build benchmarker for x86_64-linux
in: master
3 files changed
xtask/Cargo.tomldiffbeforeafterboth18xshell.workspace = true18xshell.workspace = true19clap = { workspace = true, features = ["derive"] }19clap = { workspace = true, features = ["derive"] }202021[target.'cfg(target_os = "linux")'.dependencies]21[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dependencies]22nix.workspace = true22nix.workspace = true2323xtask/src/bench.rsdiffbeforeafterboth--- a/xtask/src/bench.rs
+++ b/xtask/src/bench.rs
@@ -1,3 +1,5 @@
+#![allow(clippy::cast_precision_loss)]
+
use std::{
ffi::OsString,
mem,
xtask/src/main.rsdiffbeforeafterboth--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -1,10 +1,8 @@
use anyhow::Result;
-#[cfg(not(target_os = "linux"))]
-use anyhow::bail;
use clap::Parser;
use xshell::{Shell, cmd};
-#[cfg(target_os = "linux")]
+#[cfg(all(target_arch = "x86_64", target_os = "linux"))]
mod bench;
mod sourcegen;
@@ -40,6 +38,7 @@
args: Vec<String>,
},
/// Benchmark a command: repeated runs, reports time + RSS stats (Linux only)
+ #[cfg(all(target_arch = "x86_64", target_os = "linux"))]
Bench {
#[arg(long, default_value_t = 10)]
runs: u32,
@@ -121,7 +120,7 @@
Ok(())
}
- #[cfg(target_os = "linux")]
+ #[cfg(all(target_arch = "x86_64", target_os = "linux"))]
Opts::Bench {
runs,
warmup,