Skip to content

Commit e430795

Browse files
Truc4jarkonik
andauthored
Compile on windows (#62)
* Don't check for rdynamic linking on Windows for now, fixes Windows builds --------- Co-authored-by: Jaroslaw Konik <konikjar@gmail.com>
1 parent c6bdfb1 commit e430795

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ impl<R: Runtime> Default for Callbacks<R> {
510510
}
511511
}
512512

513-
#[cfg(debug_assertions)]
513+
#[cfg(all(debug_assertions, unix))]
514514
pub extern "C" fn is_rdynamic_linking() -> bool {
515515
unsafe {
516516
// Get a function pointer to itself
@@ -524,6 +524,12 @@ pub extern "C" fn is_rdynamic_linking() -> bool {
524524
}
525525
}
526526

527+
#[cfg(any(not(debug_assertions), not(unix)))]
528+
pub extern "C" fn is_rdynamic_linking() -> bool {
529+
// On Windows or in release builds, return a default value
530+
true
531+
}
532+
527533
pub mod prelude {
528534
pub use crate::{BuildScriptingRuntime as _, Runtime as _, Script};
529535
}

0 commit comments

Comments
 (0)