From f828985d5dd2fb579cf18707a1609eec4e223dee Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 12 Dec 2025 21:55:51 -0500 Subject: [PATCH] [WARP] Fix `warp_headless` example not linking binaryninjacore --- plugins/warp/examples/headless/build.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/warp/examples/headless/build.rs diff --git a/plugins/warp/examples/headless/build.rs b/plugins/warp/examples/headless/build.rs new file mode 100644 index 0000000000..ed6cec7d27 --- /dev/null +++ b/plugins/warp/examples/headless/build.rs @@ -0,0 +1,15 @@ +fn main() { + let link_path = std::env::var_os("DEP_BINARYNINJACORE_PATH") + .expect("DEP_BINARYNINJACORE_PATH not specified"); + + println!("cargo::rustc-link-lib=dylib=binaryninjacore"); + println!("cargo::rustc-link-search={}", link_path.to_str().unwrap()); + + #[cfg(not(target_os = "windows"))] + { + println!( + "cargo::rustc-link-arg=-Wl,-rpath,{0},-L{0}", + link_path.to_string_lossy() + ); + } +}