From a184a2a04f0203dd1f597cdb248afa67dcf951b3 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Wed, 15 Apr 2026 09:11:23 -0700 Subject: [bntl] Fix rpaths to not include an absolute path into the build directory on macOS --- plugins/bntl_utils/build.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins') diff --git a/plugins/bntl_utils/build.rs b/plugins/bntl_utils/build.rs index 9165a33e..648b0371 100644 --- a/plugins/bntl_utils/build.rs +++ b/plugins/bntl_utils/build.rs @@ -7,7 +7,7 @@ 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}", @@ -15,15 +15,15 @@ fn main() { ); } - // #[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 - // ); - // } + #[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 + ); + } let out_dir = std::env::var("OUT_DIR").expect("OUT_DIR specified"); let out_dir_path = PathBuf::from(out_dir); -- cgit v1.3.1