summaryrefslogtreecommitdiff
path: root/rust/src/lib.rs
diff options
context:
space:
mode:
authoryrp <yrp604@protonmail.com>2021-02-14 21:41:02 -0800
committerKyle Martin <krm504@nyu.edu>2021-02-26 21:29:59 -0500
commit04597e06cdb05948fb145378d23a4cb5a90f3c0f (patch)
treec46971c0c86d556ff3d1e951dacf2f4b51b26709 /rust/src/lib.rs
parent99758cde539320e7d5bf546954993771bb427b23 (diff)
Fix rust plugin linking on Windows
Windows requires the symbols from the core to crate the plugin dll. As these were gated behind the headless feature, these didn't exist, and thus linking failed. Enabling the headless feature was also insufficient, as headless features disabled CorePluginABIVersion function. This patch turns all the headless cfgs into headless or windows cfgs.
Diffstat (limited to 'rust/src/lib.rs')
-rw-r--r--rust/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
index 3d287321..eba2d8ee 100644
--- a/rust/src/lib.rs
+++ b/rust/src/lib.rs
@@ -233,7 +233,7 @@ pub fn core_abi_minimum_version() -> u32 {
}
// Provide ABI version automatically so that the core can verify binary compatibility
-#[cfg(not(feature = "headless"))]
+#[cfg(any(windows, not(feature = "headless")))]
#[no_mangle]
#[allow(non_snake_case)]
pub extern "C" fn CorePluginABIVersion() -> u32 { plugin_abi_version() }