Skip to content

Commit

Permalink
Merge pull request #231 from EmbarkStudios/main
Browse files Browse the repository at this point in the history
Disable neon for apple targets
  • Loading branch information
Byron authored Dec 6, 2024
2 parents 99f0479 + 413205e commit 223f565
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 223f565

Please sign in to comment.