Skip to content

Commit

Permalink
Disable neon for apple targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Dec 6, 2024
1 parent 99f0479 commit 413205e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions zng/cc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
"crc32_braid_c",
"crc32_fold_c",
"slide_hash_c",
]
],
);

if compat {
Expand Down Expand Up @@ -196,7 +196,8 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
.flag("-fvisibility=hidden");
}

if target.contains("apple") {
let is_apple = target.contains("apple");
if is_apple {
cfg.define("_C99_SOURCE", None);
} else if target.contains("solaris") {
cfg.define("_XOPEN_SOURCE", "700");
Expand Down Expand Up @@ -322,7 +323,8 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
// neon
// Fix armv7-unknown-linux-musleabi and arm-unknown-linux-musleabi by only
// passing in ARM_NEON if that target is enabled.
if features.split(",").any(|name| name == "neon") {
// Disable for apple targets due to https://github.com/rust-lang/libz-sys/issues/230
if !is_apple && features.split(",").any(|name| name == "neon") {
cfg.define("ARM_NEON", None);
}

Expand Down

0 comments on commit 413205e

Please sign in to comment.