summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-01-27 19:04:59 -0500
committerMason Reed <mason@vector35.com>2025-01-27 19:04:59 -0500
commit4551d1f3f4c99d72437d5908fe2aaa0ac850bb1f (patch)
treedaac6fcd0ce64cc86b7894b9ce7d1792ee7e7eee /plugins
parent01a224425d2a90e660bbfffe8d1cbc6b93da24bd (diff)
Fix building rust tests in demo mode
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pdb-ng/demo/build.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/pdb-ng/demo/build.rs b/plugins/pdb-ng/demo/build.rs
new file mode 100644
index 00000000..ed6cec7d
--- /dev/null
+++ b/plugins/pdb-ng/demo/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()
+ );
+ }
+}