From e3627b2832ba96fc0b919a0c2b5a46c8c78c8042 Mon Sep 17 00:00:00 2001 From: Inforithmics Date: Mon, 11 Aug 2025 18:39:10 +0200 Subject: [PATCH] Add vulkan to Windows Build script --- scripts/build_windows.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/build_windows.ps1 b/scripts/build_windows.ps1 index 27f3eb9d4..057b64c90 100644 --- a/scripts/build_windows.ps1 +++ b/scripts/build_windows.ps1 @@ -128,6 +128,15 @@ function buildOllama() { & cmake --install build --component "HIP" --strip if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} } + if ($env:VULKAN_SDK) { + write-host "Building Vulkan backend libraries" + & cmake --fresh --preset Vulkan --install-prefix $script:DIST_DIR + if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} + & cmake --build --preset Vulkan --config Release --parallel $script:JOBS + if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} + & cmake --install build --component Vulkan --strip + if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} + } } write-host "Building ollama CLI" & go build -trimpath -ldflags "-s -w -X=github.com/ollama/ollama/version.Version=$script:VERSION -X=github.com/ollama/ollama/server.mode=release" .