blob: 3bc125010d5c9109147d9f0e86e7d6b6a2bbce7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
use std::env::VarError;
use std::{env, path::PathBuf};
fn main() -> Result<(), VarError> {
println!("cargo:rustc-link-lib=dylib=amdhip64");
if cfg!(windows) {
let env = env::var("CARGO_CFG_TARGET_ENV")?;
if env == "msvc" {
let mut path = PathBuf::from(env::var("CARGO_MANIFEST_DIR")?);
path.push("lib");
println!("cargo:rustc-link-search=native={}", path.display());
} else {
println!("cargo:rustc-link-search=native=C:\\Windows\\System32");
};
} else {
//println!("cargo:rustc-link-search=native=/opt/rocm/lib/");
println!("cargo:rustc-link-search=native=/home/ubuntu/hipamd/build/lib");
println!("cargo:rustc-link-search=native=/home/vosen/hipamd/build/lib");
}
Ok(())
}
|