From ed5fb088c4d7f57ea3ccf629e36ecb2e857e22eb Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Fri, 26 Apr 2024 15:10:42 -0700 Subject: [PATCH] Fix target in gen_windows.ps1 --- llm/generate/gen_windows.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llm/generate/gen_windows.ps1 b/llm/generate/gen_windows.ps1 index 6f26fb1c..7639f4c9 100644 --- a/llm/generate/gen_windows.ps1 +++ b/llm/generate/gen_windows.ps1 @@ -26,7 +26,6 @@ function amdGPUs { $GPU_LIST -join ';' } -$script:cmakeTargets = @("ollama_llama_server") function init_vars { if (!$script:SRC_DIR) { @@ -35,6 +34,9 @@ function init_vars { if (!$script:llamacppDir) { $script:llamacppDir = "../llama.cpp" } + if (!$script:cmakeTargets) { + $script:cmakeTargets = @("ollama_llama_server") + } $script:cmakeDefs = @( "-DBUILD_SHARED_LIBS=on", "-DLLAMA_NATIVE=off" @@ -188,6 +190,7 @@ function build_static() { # error action ensures we exit on failure get-command gcc get-command mingw32-make + $oldTargets = $script:cmakeTargets $script:cmakeTargets = @("llama", "ggml") $script:cmakeDefs = @( "-G", "MinGW Makefiles" @@ -203,6 +206,7 @@ function build_static() { $script:buildDir="../build/windows/${script:ARCH}_static" write-host "Building static library" build + $script:cmakeTargets = $oldTargets } else { write-host "Skipping CPU generation step as requested" }