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(windows): cap MSVC codegen at AVX2 to prevent illegal instruction crash on Lunar Lake

louis030195b0dc0cb3f8a4
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index bc2ad8082..56d286401 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -804,6 +804,11 @@ jobs:
CARGO_PROFILE_RELEASE_PANIC: abort
CARGO_PROFILE_RELEASE_INCREMENTAL: "false"
RUSTFLAGS: -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).
+ CFLAGS: /arch:AVX2
+ CXXFLAGS: /arch:AVX2
# Fix whisper.cpp crash on newer CPUs (Lunar Lake, etc.) that lack AVX-512
# GGML_NATIVE=ON compiles with -march=native, causing illegal instruction on CPUs without AVX-512
CMAKE_ARGS: -DGGML_NATIVE=OFF -DGGML_AVX512=OFF -DGGML_AVX512_VBMI=OFF -DGGML_AVX512_VNNI=OFF -DGGML_AVX512_BF16=OFF