ZLUDA/ext/amd_comgr-sys/build.rs
Andrzej Janik 46def3e7e0
Some checks failed
Rust / Build and publish (Linux) (push) Has been cancelled
Rust / Build and publish (Windows) (push) Has been cancelled
Connect new parser to LLVM bitcode backend (#269)
This is very incomplete. Just enough code to emit LLVM bitcode and continue further development
2024-09-13 01:07:31 +02:00

20 lines
698 B
Rust
Vendored

use std::env::VarError;
use std::{env, path::PathBuf};
fn main() -> Result<(), VarError> {
if cfg!(windows) {
println!("cargo:rustc-link-lib=dylib=amd_comgr_2");
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-lib=dylib=amd_comgr");
println!("cargo:rustc-link-search=native=/opt/rocm/lib/");
}
Ok(())
}