From a09e487a6716676d12b8759dc7a51b1041f2b868 Mon Sep 17 00:00:00 2001 From: Kevin Hardy Date: Tue, 26 Mar 2024 22:58:21 +0900 Subject: [PATCH] Fix library name on Windows, leave as is elsewhere --- crates/llama-cpp-bindings/build.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/llama-cpp-bindings/build.rs b/crates/llama-cpp-bindings/build.rs index 58d41e6783fd..8c0da8a72326 100644 --- a/crates/llama-cpp-bindings/build.rs +++ b/crates/llama-cpp-bindings/build.rs @@ -94,7 +94,11 @@ fn build_llama_cpp() { println!("cargo:rustc-link-search={}/lib", vulkan_sdk_path); } config.define("LLAMA_VULKAN", "ON"); - println!("cargo:rustc-link-lib=vulkan"); + if cfg!(target_os = "windows") { + println!("cargo:rustc-link-lib=vulkan-1"); + } else { + println!("cargo:rustc-link-lib=vulkan"); + } } // By default, this value is automatically inferred from Rust’s compilation profile.