From 50fa1008c02d748e4620c62fca9a913b6b2eff27 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 1 Dec 2022 20:18:30 +0100 Subject: [PATCH] Allow assert_process_allocs+mingw-w64 in release This causes the application to halt in debug builds, but it shouldn't be an issue in release builds. --- src/wrapper/util.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wrapper/util.rs b/src/wrapper/util.rs index 3ccdfcab..b81b4f4b 100644 --- a/src/wrapper/util.rs +++ b/src/wrapper/util.rs @@ -17,7 +17,11 @@ const NIH_LOG_ENV: &str = "NIH_LOG"; #[cfg(target_arch = "aarch64")] const AARCH64_FTZ_BIT: u64 = 1 << 24; -#[cfg(all(feature = "assert_process_allocs", all(windows, target_env = "gnu")))] +#[cfg(all( + debug_assertions, + physical_sizefeature = "assert_process_allocs", + all(windows, target_env = "gnu") +))] compile_error!("The 'assert_process_allocs' feature does not work correctly in combination with the 'x86_64-pc-windows-gnu' target, see https://github.com/Windfisch/rust-assert-no-alloc/issues/7"); #[cfg(all(debug_assertions, feature = "assert_process_allocs"))]