Merge pull request #175 from thewh1teagle/fix/link-coreml

fix: add search path for coreml on macOS
This commit is contained in:
Niko 2024-10-21 23:54:24 +00:00 committed by GitHub
commit 95689c6b80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,6 +32,7 @@ fn main() {
#[cfg(feature = "coreml")] #[cfg(feature = "coreml")]
println!("cargo:rustc-link-lib=static=whisper.coreml"); println!("cargo:rustc-link-lib=static=whisper.coreml");
#[cfg(feature = "openblas")] #[cfg(feature = "openblas")]
{ {
if let Ok(openblas_path) = env::var("OPENBLAS_PATH") { if let Ok(openblas_path) = env::var("OPENBLAS_PATH") {
@ -244,6 +245,7 @@ fn main() {
let destination = config.build(); let destination = config.build();
add_link_search_path(&out.join("lib")).unwrap(); add_link_search_path(&out.join("lib")).unwrap();
add_link_search_path(&out.join("build/src")).unwrap();
println!("cargo:rustc-link-search=native={}", destination.display()); println!("cargo:rustc-link-search=native={}", destination.display());
println!("cargo:rustc-link-lib=static=whisper"); println!("cargo:rustc-link-lib=static=whisper");