From dd19e34842405e343096d30f80f9fd1dfce8c57b Mon Sep 17 00:00:00 2001 From: Geoff Martin Date: Wed, 4 Dec 2024 12:22:15 +0000 Subject: [PATCH] Modifications to support symbol mangling on macOS. --- build.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index d9e335e..8934dab 100644 --- a/build.rs +++ b/build.rs @@ -199,7 +199,10 @@ fn main() { item.push_str(item_info.name); match self.symbols.contains(&item) { true => { - let mut prefix = self.prefix.clone(); + let mut prefix = String::from(""); + #[cfg(target_os = "macos")] + prefix.push('_'); + prefix.push_str(&self.prefix); prefix.push_str(item_info.name); Some(prefix) }