diff options
author | Andrzej Janik <[email protected]> | 2021-01-08 17:17:46 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-08 17:17:46 +0100 |
commit | 078ae20c2c0aff93858eeb69d0c46dad4d997998 (patch) | |
tree | 38d2313c5bab64e2a84c90a219bd60ce6808f116 /level_zero-sys | |
parent | 2c0e9b912fe341bd1e513614014fa43b666d257d (diff) | |
download | ZLUDA-078ae20c2c0aff93858eeb69d0c46dad4d997998.tar.gz ZLUDA-078ae20c2c0aff93858eeb69d0c46dad4d997998.zip |
Improve build procedure and instructions (#28)
Fixes issues pointed out in #27:
* spirv_tools-sys was build in non-test profiles
* By default ZLUDA dll has a wrong name
* We relied on third-party OpenCL installation on Windows
* We encouraged building debug configuration
* We didn't provide build information for developers (cmake, python, submodules)
Diffstat (limited to 'level_zero-sys')
-rw-r--r-- | level_zero-sys/build.rs | 13 | ||||
-rw-r--r-- | level_zero-sys/lib/ze_loader.lib (renamed from level_zero-sys/src/ze_loader.lib) | bin | 75668 -> 75668 bytes |
2 files changed, 6 insertions, 7 deletions
diff --git a/level_zero-sys/build.rs b/level_zero-sys/build.rs index 4a638ec..0d2488c 100644 --- a/level_zero-sys/build.rs +++ b/level_zero-sys/build.rs @@ -1,18 +1,17 @@ use env::VarError; use std::{env, path::PathBuf}; -fn main() -> Result<(), VarError> { +fn main() -> Result<(), VarError> { println!("cargo:rustc-link-lib=dylib=ze_loader"); - if env::var("CARGO_CFG_WINDOWS").is_ok() { + if cfg!(windows) { let env = env::var("CARGO_CFG_TARGET_ENV")?; - if env == "gnu" { - println!("cargo:rustc-link-search=native=C:\\Windows\\System32"); - } else { + if env == "msvc" { let mut path = PathBuf::from(env::var("CARGO_MANIFEST_DIR")?); - path.push("src"); + path.push("lib"); println!("cargo:rustc-link-search=native={}", path.display()); + } else { + println!("cargo:rustc-link-search=native=C:\\Windows\\System32"); }; } - println!("cargo:rerun-if-changed=build.rs"); Ok(()) } diff --git a/level_zero-sys/src/ze_loader.lib b/level_zero-sys/lib/ze_loader.lib Binary files differindex 661240c..661240c 100644 --- a/level_zero-sys/src/ze_loader.lib +++ b/level_zero-sys/lib/ze_loader.lib |