Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: remove LTCG from Windows builds to prevent illegal instruction crashes

Louis Beaumont0874efd3f89c
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index f9b5b161c..adbd4332c 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -788,10 +788,13 @@ jobs:
CARGO_PROFILE_RELEASE_STRIP: none
CARGO_PROFILE_RELEASE_PANIC: abort
CARGO_PROFILE_RELEASE_INCREMENTAL: "false"
- RUSTFLAGS: ${{ matrix.target == 'x86_64-pc-windows-msvc' && '-C link-arg=/LTCG' || '' }}
- # Cap MSVC codegen at AVX2 — prevents LTCG from auto-vectorizing C deps
- # (e.g. sqlite-vec) to AVX-512 on CI Xeon runners. Lunar Lake and other
- # consumer CPUs lack AVX-512, causing STATUS_ILLEGAL_INSTRUCTION (0xc000001d).
+ # LTCG removed: MSVC has known bugs where LTCG ignores /arch:AVX2 and
+ # emits AVX-512 instructions on Xeon CI runners, causing STATUS_ILLEGAL_INSTRUCTION
+ # (0xc000001d) on consumer CPUs without AVX-512 (Arrow Lake, Panther Lake, Lunar Lake).
+ # See: https://developercommunity.visualstudio.com/content/problem/848627
+ RUSTFLAGS: ""
+ # Cap MSVC codegen at AVX2 — prevents auto-vectorizing C deps
+ # (e.g. sqlite-vec) to AVX-512 on CI Xeon runners.
# Only set for x86_64 — clang on ARM64 doesn't understand /arch:AVX2.
CFLAGS: ${{ matrix.target == 'x86_64-pc-windows-msvc' && '/arch:AVX2' || '' }}
CXXFLAGS: ${{ matrix.target == 'x86_64-pc-windows-msvc' && '/arch:AVX2' || '' }}
diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml
index 3243f2f66..996b70dfd 100644
--- a/.github/workflows/release-cli.yml
+++ b/.github/workflows/release-cli.yml
@@ -327,8 +327,10 @@ jobs:
CARGO_PROFILE_RELEASE_STRIP: "none"
CARGO_PROFILE_RELEASE_PANIC: "abort"
CARGO_PROFILE_RELEASE_INCREMENTAL: "false"
- RUSTFLAGS: "-C link-arg=/LTCG"
- # Cap MSVC codegen at AVX2 — prevent AVX-512 on Lunar Lake, Arrow Lake etc.
+ # LTCG removed: MSVC LTCG ignores /arch:AVX2 and can emit AVX-512 on Xeon CI runners
+ # causing STATUS_ILLEGAL_INSTRUCTION on consumer CPUs (Arrow Lake, Panther Lake, Lunar Lake)
+ RUSTFLAGS: ""
+ # Cap MSVC codegen at AVX2 — prevent AVX-512 on consumer CPUs
CFLAGS: "/arch:AVX2"
CXXFLAGS: "/arch:AVX2"
# Also cap CMake-built deps (whisper.cpp/GGML) — CFLAGS doesn't reach cmake crate