diff --git a/src/zig.rs b/src/zig.rs index b412f24..c3236e7 100644 --- a/src/zig.rs +++ b/src/zig.rs @@ -143,12 +143,21 @@ impl Zig { return None; } else if is_riscv64 { return Some("-march=generic_rv64".to_string()); - } else if arg.starts_with("-march=armv8-a") - && target + } else if arg.starts_with("-march=armv8-a") { + if target .map(|x| x.starts_with("aarch64-macos")) .unwrap_or_default() - { - return Some(arg.replace("armv8-a", "apple_a14")); + { + return Some(arg.replace("armv8-a", "apple_a14")); + } else if target + .map(|x| x.starts_with("aarch64-linux")) + .unwrap_or_default() + { + return Some( + arg.replace("armv8-a", "generic+v8a") + .replace("simd", "neon"), + ); + } } } Some(arg.to_string()) diff --git a/tests/hello-cmake/Cargo.lock b/tests/hello-cmake/Cargo.lock index bd8f391..c530941 100644 --- a/tests/hello-cmake/Cargo.lock +++ b/tests/hello-cmake/Cargo.lock @@ -21,36 +21,21 @@ dependencies = [ name = "hello-cmake" version = "0.1.0" dependencies = [ - "libz-sys", + "libz-ng-sys", ] [[package]] name = "libc" -version = "0.2.141" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] -name = "libz-sys" -version = "1.1.8" +name = "libz-ng-sys" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" +checksum = "2468756f34903b582fe7154dc1ffdebd89d0562c4a43b53c621bb0f1b1043ccb" dependencies = [ - "cc", "cmake", "libc", - "pkg-config", - "vcpkg", ] - -[[package]] -name = "pkg-config" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" diff --git a/tests/hello-cmake/Cargo.toml b/tests/hello-cmake/Cargo.toml index 552f525..c36a1ac 100644 --- a/tests/hello-cmake/Cargo.toml +++ b/tests/hello-cmake/Cargo.toml @@ -6,4 +6,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libz-sys = { version = "1.1.8", default-features = false, features = ["zlib-ng"] } +libz-ng-sys = "1.1.9" diff --git a/tests/hello-cmake/src/main.rs b/tests/hello-cmake/src/main.rs index b7ac35b..61d06ba 100644 --- a/tests/hello-cmake/src/main.rs +++ b/tests/hello-cmake/src/main.rs @@ -1,6 +1,6 @@ use std::ffi::CStr; -use libz_sys::zlibVersion; +use libz_ng_sys::zlibVersion; fn main() { let ver = unsafe { zlibVersion() };