From 04a14677e423f9a93ae8f795e2c34b4abf9c8eee Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sun, 3 Oct 2021 10:24:20 -0700 Subject: [PATCH] Issue a friendlier error message if fde-registry is enabled with no lock impl. --- src/unwinder/find_fde/registry.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/unwinder/find_fde/registry.rs b/src/unwinder/find_fde/registry.rs index 0f2502c..5341a35 100644 --- a/src/unwinder/find_fde/registry.rs +++ b/src/unwinder/find_fde/registry.rs @@ -67,6 +67,8 @@ unsafe fn lock_global_state() -> impl ops::DerefMut { }); MUTEX.lock() } + #[cfg(not(any(feature = "libc", feature = "spin")))] + compile_error!("Either feature \"libc\" or \"spin\" must be enabled to use \"fde-registry\"."); } pub fn get_finder() -> &'static Registry {