Skip to content

Commit

Permalink
fix: add missing search path for link opencl libs
Browse files Browse the repository at this point in the history
  • Loading branch information
thewh1teagle committed Aug 1, 2024
1 parent 744804a commit d1eea3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
**/target
**/Cargo.lock
/.idea
/.vscode
/.vscode
/clblast
*.7z
*.bin
6 changes: 6 additions & 0 deletions sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ fn main() {
println!("cargo:rustc-link-lib=static=whisper.coreml");
#[cfg(feature = "opencl")]
{
if let Ok(clblast_dir) = env::var("CLBLast_DIR") {
println!("cargo::rustc-link-search={}", PathBuf::from(clblast_dir).join("..\\..").display());
}
if let Ok(opencl_dir) = env::var("OPENCL_DIR") {
println!("cargo::rustc-link-search={}", opencl_dir);
}
println!("cargo:rustc-link-lib=clblast");
println!("cargo:rustc-link-lib=OpenCL");
}
Expand Down

0 comments on commit d1eea3a

Please sign in to comment.