fix(build): restore /O2 /DNDEBUG for native deps clobbered by cmake-rs on MSVC
cmake-rs hardcodes opt_level(0) and replaces CMake's Release C flags, so ggml/whisper.cpp compiled at /Od — root cause of the W1 CPU-pathology (RTF ~20) in docs/benchmarks/2026-07-parakeet-vs-whisper.md. cc-rs appends env CFLAGS/CXXFLAGS last, restoring optimization for all native deps.
This commit is contained in:
1 parent
32e0d3c8d9
commit
d89b99db6c
1 file changed
+10
@@ -0,0 +1,10 @@
|
|||||||
|
# Fix: whisper.cpp (whisper-rs-sys) is configured by the cmake crate, which
|
||||||
|
# hardcodes opt_level(0) and overwrites CMake's default MSVC Release flags
|
||||||
|
# (/O2 /Ob2 /DNDEBUG) with unoptimized ones — ggml's CPU kernels were compiled
|
||||||
|
# at /Od with asserts on, making CPU-only transcription ~40x slower than real
|
||||||
|
# time (bench finding W1, docs/benchmarks/2026-07-parakeet-vs-whisper.md).
|
||||||
|
# cc-rs appends these env flags after its own, so they win for every native
|
||||||
|
# dep. MSVC-only flags are fine: WhispAssist is a Windows-native app.
|
||||||
|
[env]
|
||||||
|
CFLAGS = "/O2 /DNDEBUG"
|
||||||
|
CXXFLAGS = "/O2 /DNDEBUG"
|
||||||
Reference in new issue
Block a user