Skip to content

Commit 049245b

Browse files
committed
Probably unnecessary, but check for avx512bw instead of assuming it
1 parent 70e319a commit 049245b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

llama-cpp-sys-2/build.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,13 @@ fn push_feature_flags(cx: &mut Build, cxx: &mut Build) {
271271

272272
if cfg!(target_family = "unix") {
273273
if cfg!(target_feature = "avx512f") {
274-
cx.flag("-mavx512f").flag("-mavx512bw");
275-
cxx.flag("-mavx512f").flag("-mavx512bw");
274+
cx.flag("-mavx512f");
275+
cxx.flag("-mavx512f");
276+
277+
if cfg!(target_feature = "avx512bw") {
278+
cx.flag("-mavx512bw");
279+
cxx.flag("-mavx512bw");
280+
}
276281

277282
if cfg!(target_feature = "avx512vbmi") {
278283
cx.flag("-mavx512vbmi");

0 commit comments

Comments
 (0)