From 71c7e00f2bc51296364fc21c6713df7e0876bf2a Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 5 Oct 2022 17:22:29 +0200 Subject: [PATCH] Prevent assert_process_allocs on x86_64-pc-windows-gnu This will result in plugins that hang during their first allocation. --- src/wrapper/util.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wrapper/util.rs b/src/wrapper/util.rs index 247b9e45..3ccdfcab 100644 --- a/src/wrapper/util.rs +++ b/src/wrapper/util.rs @@ -17,6 +17,9 @@ 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")))] +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"))] #[global_allocator] static A: assert_no_alloc::AllocDisabler = assert_no_alloc::AllocDisabler;