Skip to content

Commit 223f565

Browse files
authored
Merge pull request #231 from EmbarkStudios/main
Disable neon for apple targets
2 parents 99f0479 + 413205e commit 223f565

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

zng/cc.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
149149
"crc32_braid_c",
150150
"crc32_fold_c",
151151
"slide_hash_c",
152-
]
152+
],
153153
);
154154

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

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

0 commit comments

Comments
 (0)