Fix candle-flash-attn build on Windows (msvc) (#2734)

This commit is contained in:
Sergei Grebnov
2025-01-22 13:19:48 -08:00
committed by GitHub
parent 77db8396d0
commit e6cd499e98

View File

@ -88,6 +88,12 @@ fn main() -> Result<()> {
.arg("--use_fast_math")
.arg("--verbose");
if let Ok(target) = std::env::var("TARGET") {
if target.contains("msvc") {
builder = builder.arg("-D_USE_MATH_DEFINES");
}
}
let out_file = build_dir.join("libflashattention.a");
builder.build_lib(out_file);