From 5085ee9b1ac30ee36953d2a0584c244bce54d4f4 Mon Sep 17 00:00:00 2001 From: Tyera Date: Thu, 30 Nov 2023 07:48:08 -0700 Subject: [PATCH] Only compile bench_program_alu for x86_64 (#34282) Ignore bench if not x86_64 --- programs/sbf/benches/bpf_loader.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/sbf/benches/bpf_loader.rs b/programs/sbf/benches/bpf_loader.rs index 7ef6966a80dbe0..4cc0bc88d5d3bb 100644 --- a/programs/sbf/benches/bpf_loader.rs +++ b/programs/sbf/benches/bpf_loader.rs @@ -2,6 +2,7 @@ #![cfg(feature = "sbf_c")] #![allow(clippy::uninlined_format_args)] #![allow(clippy::arithmetic_side_effects)] +#![cfg_attr(not(target_arch = "x86_64"), allow(dead_code, unused_imports))] use { solana_rbpf::memory_region::MemoryState, @@ -101,6 +102,7 @@ fn bench_program_create_executable(bencher: &mut Bencher) { } #[bench] +#[cfg(target_arch = "x86_64")] fn bench_program_alu(bencher: &mut Bencher) { let ns_per_s = 1000000000; let one_million = 1000000;