Fix CRT linkage in Windows CUDA build (#8987)

Signed-off-by: jh-block <jhugo@block.xyz>
This commit is contained in:
jh-block
2026-05-04 16:36:13 +02:00
committed by GitHub
parent 5021a88ce3
commit 93d5672f5b
5 changed files with 114 additions and 68 deletions
+1 -3
View File
@@ -157,12 +157,10 @@ jobs:
shell: pwsh
env:
CUDA_COMPUTE_CAP: ${{ matrix.variant == 'cuda' && '80' || '' }}
LLAMA_STATIC_CRT: ${{ matrix.variant == 'cuda' && '1' || '' }}
run: |
Write-Output "Building Windows CLI executable..."
if ("${{ matrix.variant }}" -eq "cuda") {
$cudaRustflagsConfig = 'target.x86_64-pc-windows-msvc.rustflags=["-C","target-feature=+crt-static"]'
cargo build --config $cudaRustflagsConfig --release --target x86_64-pc-windows-msvc -p goose-cli --features cuda
cargo build --release --target x86_64-pc-windows-msvc -p goose-cli --features cuda
} else {
cargo build --release --target x86_64-pc-windows-msvc -p goose-cli
}
+1 -3
View File
@@ -112,12 +112,10 @@ jobs:
shell: pwsh
env:
CUDA_COMPUTE_CAP: ${{ inputs.windows_variant == 'cuda' && '80' || '' }}
LLAMA_STATIC_CRT: ${{ inputs.windows_variant == 'cuda' && '1' || '' }}
run: |
Write-Output "Building Windows executable..."
if ("${{ inputs.windows_variant }}" -eq "cuda") {
$cudaRustflagsConfig = 'target.x86_64-pc-windows-msvc.rustflags=["-C","target-feature=+crt-static"]'
cargo build --config $cudaRustflagsConfig --release --target x86_64-pc-windows-msvc -p goose-server --features cuda
cargo build --release --target x86_64-pc-windows-msvc -p goose-server --features cuda
} else {
cargo build --release --target x86_64-pc-windows-msvc -p goose-server
}