--- 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 --- a/xtask/src/bench.rs +++ b/xtask/src/bench.rs @@ -1,3 +1,5 @@ +#![allow(clippy::cast_precision_loss)] + use std::{ ffi::OsString, mem, --- 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, }, /// 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,