git.delta.rocks / jrsonnet / refs/commits / 604f09da5796

difftreelog

fix only build benchmarker for x86_64-linux

oqtmzxprYaroslav Bolyukin2026-05-06parent: #3e1d397.patch.diff
in: master

3 files changed

modifiedxtask/Cargo.tomldiffbeforeafterboth
18xshell.workspace = true18xshell.workspace = true
19clap = { workspace = true, features = ["derive"] }19clap = { workspace = true, features = ["derive"] }
2020
21[target.'cfg(target_os = "linux")'.dependencies]21[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dependencies]
22nix.workspace = true22nix.workspace = true
2323
modifiedxtask/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,
modifiedxtask/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,