diff options
| author | Mark Rowe <mark@vector35.com> | 2026-02-10 00:08:01 -0800 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2026-02-10 07:16:30 -0800 |
| commit | eab54b005e28cda35ac140e1bb504cb7bcaae56e (patch) | |
| tree | 864b6b9b6a9984bfb67f113dc198dcaf26f48351 /plugins/workflow_objc | |
| parent | c56a37539cbafd3c2a8745138009265a211413b3 (diff) | |
Fix rpath of workflow_objc on macOS
Diffstat (limited to 'plugins/workflow_objc')
| -rw-r--r-- | plugins/workflow_objc/build.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/workflow_objc/build.rs b/plugins/workflow_objc/build.rs index ed6cec7d..9006f16a 100644 --- a/plugins/workflow_objc/build.rs +++ b/plugins/workflow_objc/build.rs @@ -5,11 +5,21 @@ fn main() { println!("cargo::rustc-link-lib=dylib=binaryninjacore"); println!("cargo::rustc-link-search={}", link_path.to_str().unwrap()); - #[cfg(not(target_os = "windows"))] + #[cfg(target_os = "linux")] { println!( "cargo::rustc-link-arg=-Wl,-rpath,{0},-L{0}", link_path.to_string_lossy() ); } + + #[cfg(target_os = "macos")] + { + let crate_name = std::env::var("CARGO_PKG_NAME").expect("CARGO_PKG_NAME not set"); + let lib_name = crate_name.replace('-', "_"); + println!( + "cargo::rustc-link-arg=-Wl,-install_name,@rpath/lib{}.dylib", + lib_name + ); + } } |
