# scripts/build-prod.ps1 # Production build of llama.cpp for Windows (Release, CUDA RTX 3070 cc86). $ErrorActionPreference = "Stop" $root = Split-Path $PSScriptRoot -Parent $vendor = Join-Path $root "vendor\llama.cpp" $buildDir = Join-Path $vendor "build-prod" if (-not (Test-Path (Join-Path $vendor "CMakeLists.txt"))) { Write-Error "vendor/llama.cpp not initialised. Run: git submodule update --init --recursive" exit 1 } Write-Host "[INFO] Configuring llama.cpp (prod, CUDA cc86)..." cmake -S $vendor -B $buildDir ` -DCMAKE_BUILD_TYPE=Release ` -DBUILD_SHARED_LIBS=ON ` -DGGML_CUDA=ON ` "-DCMAKE_CUDA_ARCHITECTURES=86" ` -DLLAMA_BUILD_TESTS=OFF ` -DLLAMA_BUILD_EXAMPLES=OFF Write-Host "[INFO] Building (Release)..." cmake --build $buildDir --config Release --parallel Write-Host "[OK] Prod build complete: $buildDir"