difftreelog
fix only build benchmarker for x86_64-linux
in: master
3 files changed
xtask/Cargo.tomldiffbeforeafterboth1[package]2name = "xtask"3version = "0.1.0"4edition = "2021"5publish = false6build = "build.rs"78[lints]9workspace = true1011[dependencies]12anyhow.workspace = true13indexmap.workspace = true14itertools.workspace = true15proc-macro2.workspace = true16quote.workspace = true17ungrammar.workspace = true18xshell.workspace = true19clap = { workspace = true, features = ["derive"] }2021[target.'cfg(target_os = "linux")'.dependencies]22nix.workspace = true1[package]2name = "xtask"3version = "0.1.0"4edition = "2021"5publish = false6build = "build.rs"78[lints]9workspace = true1011[dependencies]12anyhow.workspace = true13indexmap.workspace = true14itertools.workspace = true15proc-macro2.workspace = true16quote.workspace = true17ungrammar.workspace = true18xshell.workspace = true19clap = { workspace = true, features = ["derive"] }2021[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dependencies]22nix.workspace = truextask/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,