From a3c6fc4cb214756816a0a4c4cf1ace02378c461b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Rica=20Pais=20da=20Silva?= Date: Tue, 20 Feb 2024 17:48:44 +0100 Subject: [PATCH] fix: macos linking hack --- benches/internal.rs | 7 ++++--- src/lib.rs | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/benches/internal.rs b/benches/internal.rs index 406c4c2..5dd84c0 100644 --- a/benches/internal.rs +++ b/benches/internal.rs @@ -1,7 +1,8 @@ -extern crate bevy_rand; +use bevy_rand::BENCH; fn main() { + // MacOS workaround T___T + let _ = BENCH; + divan::main(); } - - diff --git a/src/lib.rs b/src/lib.rs index 506e629..61552a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,3 +18,7 @@ mod thread_local_entropy; pub mod traits; #[cfg(doc)] pub mod tutorial; + +#[cfg(feature = "internal_benchmarks")] +/// Only for benches +pub const BENCH: bool = true;