Skip to content

Commit 352ab7f

Browse files
authored
[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.
1 parent 13379a1 commit 352ab7f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
fn main() {
2+
let link_path = std::env::var_os("DEP_BINARYNINJACORE_PATH")
3+
.expect("DEP_BINARYNINJACORE_PATH not specified");
4+
5+
println!("cargo::rustc-link-lib=dylib=binaryninjacore");
6+
println!("cargo::rustc-link-search={}", link_path.to_str().unwrap());
7+
8+
#[cfg(not(target_os = "windows"))]
9+
{
10+
println!(
11+
"cargo::rustc-link-arg=-Wl,-rpath,{0},-L{0}",
12+
link_path.to_string_lossy()
13+
);
14+
}
15+
}

0 commit comments

Comments
 (0)