diff --git a/crates/ggml/sys/build.rs b/crates/ggml/sys/build.rs index f69cee3b..736fa156 100644 --- a/crates/ggml/sys/build.rs +++ b/crates/ggml/sys/build.rs @@ -75,17 +75,11 @@ fn main() { } "aarch64" => { if compiler.is_like_clang() || compiler.is_like_gnu() { - if std::env::var("HOST") == std::env::var("TARGET") { + if target_os == "macos" { + build.flag("-mcpu=apple-m1"); + build.flag("-mfpu=neon"); + } else if std::env::var("HOST") == std::env::var("TARGET") { build.flag("-mcpu=native"); - } else { - #[allow(clippy::single_match)] - match target_os.as_str() { - "macos" => { - build.flag("-mcpu=apple-m1"); - build.flag("-mfpu=neon"); - } - _ => {} - } } build.flag("-pthread"); }