From 551738c693b52b8c383eab629fbc9d81d04d4c4b Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Wed, 22 Oct 2025 02:09:10 -0400 Subject: Add more plugins to free Adds WARP, DWARF Import and Objective-C plugins to free --- plugins/dwarf/dwarf_import/demo/build.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 plugins/dwarf/dwarf_import/demo/build.rs (limited to 'plugins/dwarf/dwarf_import/demo/build.rs') diff --git a/plugins/dwarf/dwarf_import/demo/build.rs b/plugins/dwarf/dwarf_import/demo/build.rs new file mode 100644 index 00000000..8cbaf2b1 --- /dev/null +++ b/plugins/dwarf/dwarf_import/demo/build.rs @@ -0,0 +1,30 @@ +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() + .expect("Failed to convert link path to string") + ); + + #[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 + ); + } +} -- cgit v1.3.1