From e430795dceec4b5900c85c1f2152d6264fb6c253 Mon Sep 17 00:00:00 2001 From: Curt Reyes Date: Sun, 1 Jun 2025 06:19:43 -0600 Subject: [PATCH] Compile on windows (#62) * Don't check for rdynamic linking on Windows for now, fixes Windows builds --------- Co-authored-by: Jaroslaw Konik --- src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 0b6f097..9ee4547 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -510,7 +510,7 @@ impl Default for Callbacks { } } -#[cfg(debug_assertions)] +#[cfg(all(debug_assertions, unix))] pub extern "C" fn is_rdynamic_linking() -> bool { unsafe { // Get a function pointer to itself @@ -524,6 +524,12 @@ pub extern "C" fn is_rdynamic_linking() -> bool { } } +#[cfg(any(not(debug_assertions), not(unix)))] +pub extern "C" fn is_rdynamic_linking() -> bool { + // On Windows or in release builds, return a default value + true +} + pub mod prelude { pub use crate::{BuildScriptingRuntime as _, Runtime as _, Script}; }