-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.rs
More file actions
25 lines (23 loc) · 751 Bytes
/
build.rs
File metadata and controls
25 lines (23 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use std::env;
fn main() -> Result<(), Box<dyn std::error::Error>> {
if env::var("IDALIB_FORCE_STUB_LINKAGE").is_ok() {
idalib_build::configure_idasdk_linkage();
#[cfg(target_os = "linux")]
{
let (_, stub_path, _, _) = idalib_build::idalib_sdk_paths();
println!(
"cargo::rustc-link-arg=-Wl,-rpath,{},-L{},-l:libida.so",
stub_path.display(),
stub_path.display(),
);
println!(
"cargo::rustc-link-arg=-Wl,-rpath,{},-L{},-l:libidalib.so",
stub_path.display(),
stub_path.display(),
);
}
} else {
idalib_build::configure_linkage()?;
}
Ok(())
}