summaryrefslogtreecommitdiff
path: root/plugins/bntl_utils
diff options
context:
space:
mode:
authorMark Rowe <mark@vector35.com>2026-04-15 09:11:23 -0700
committerMark Rowe <mark@vector35.com>2026-04-15 09:44:48 -0700
commita184a2a04f0203dd1f597cdb248afa67dcf951b3 (patch)
tree68db988ee54564e82a9c255df3382a8515919834 /plugins/bntl_utils
parent15996cf9058ffd0b4d05ef56204b21e903bdd523 (diff)
[bntl] Fix rpaths to not include an absolute path into the build directory on macOS
Diffstat (limited to 'plugins/bntl_utils')
-rw-r--r--plugins/bntl_utils/build.rs20
1 files changed, 10 insertions, 10 deletions
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);