diff options
| author | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-12-13 15:26:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-13 15:26:12 -0500 |
| commit | 352ab7f585797ef8d0d84cfd8a43131d88da5bcc (patch) | |
| tree | 1f4513b0e5ba90afee07c9dee488d281235ca612 /plugins/warp | |
| parent | 13379a1f5edbebf2dbf0008fb8813dcca82a3294 (diff) | |
[WARP] Fix `warp_headless` example not linking binaryninjacore (#7787)
Would result in binaryninjacore not being loaded:
```
dyld[19068]: Library not loaded: @rpath/libbinaryninjacore.1.dylib
```
Simply forgot to add build.rs to direct cargo at where to find the lib.
Diffstat (limited to 'plugins/warp')
| -rw-r--r-- | plugins/warp/examples/headless/build.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/warp/examples/headless/build.rs b/plugins/warp/examples/headless/build.rs new file mode 100644 index 00000000..ed6cec7d --- /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() + ); + } +} |
