difftreelog
fix only build benchmarker for x86_64-linux
in: master
3 files changed
xtask/Cargo.tomldiffbeforeafterboth--- a/xtask/Cargo.toml
+++ b/xtask/Cargo.toml
@@ -18,5 +18,5 @@
xshell.workspace = true
clap = { workspace = true, features = ["derive"] }
-[target.'cfg(target_os = "linux")'.dependencies]
+[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dependencies]
nix.workspace = true
xtask/src/bench.rsdiffbeforeafterboth1#![allow(clippy::cast_precision_loss)]21use std::{3use std::{2 ffi::OsString,4 ffi::OsString,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,