Merge branch 'master' into whisper-cpp-1-7-x

# Conflicts:
#	sys/build.rs
This commit is contained in:
arizhih 2024-10-22 12:23:11 +02:00
commit cc92f1bcb1
3 changed files with 44 additions and 31 deletions

View file

@ -32,6 +32,7 @@ fn main() {
#[cfg(feature = "coreml")]
println!("cargo:rustc-link-lib=static=whisper.coreml");
#[cfg(feature = "openblas")]
{
if let Ok(openblas_path) = env::var("OPENBLAS_PATH") {
@ -194,6 +195,17 @@ fn main() {
};
let vulkan_lib_path = vulkan_path.join("Lib");
println!("cargo:rustc-link-search={}", vulkan_lib_path.display());
} else if cfg!(target_os = "macos") {
println!("cargo:rerun-if-env-changed=VULKAN_SDK");
println!("cargo:rustc-link-lib=vulkan");
let vulkan_path = match env::var("VULKAN_SDK") {
Ok(path) => PathBuf::from(path),
Err(_) => panic!(
"Please install Vulkan SDK and ensure that VULKAN_SDK env variable is set"
),
};
let vulkan_lib_path = vulkan_path.join("lib");
println!("cargo:rustc-link-search={}", vulkan_lib_path.display());
} else {
println!("cargo:rustc-link-lib=vulkan");
}