From 6b9cbe5e23443eb05d5cbdf645cb54b3706ea0c6 Mon Sep 17 00:00:00 2001 From: rsdy
Date: Sat, 9 Oct 2021 19:46:07 +0100
Subject: [PATCH] Match the C binding's target arch detection with the root
crate's
---
c/blake3_c_rust_bindings/build.rs | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/c/blake3_c_rust_bindings/build.rs b/c/blake3_c_rust_bindings/build.rs
index d5dc47a..98f8396 100644
--- a/c/blake3_c_rust_bindings/build.rs
+++ b/c/blake3_c_rust_bindings/build.rs
@@ -22,6 +22,10 @@ fn is_armv7() -> bool {
target_components()[0] == "armv7"
}
+fn is_aarch64() -> bool {
+ target_components()[0] == "aarch64"
+}
+
// Windows targets may be using the MSVC toolchain or the GNU toolchain. The
// right compiler flags to use depend on the toolchain. (And we don't want to
// use flag_if_supported, because we don't want features to be silently
@@ -148,10 +152,14 @@ fn main() -> Result<(), Box