From 529037fbd4594152ab43090234ce98d26285f76a Mon Sep 17 00:00:00 2001 From: Jay Thomas Date: Sun, 18 Oct 2020 02:35:39 -0400 Subject: [PATCH] Add ARM support (#274) --- src/system_info.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/system_info.rs b/src/system_info.rs index e93e33c..fbd1f56 100644 --- a/src/system_info.rs +++ b/src/system_info.rs @@ -8,12 +8,22 @@ pub fn platform_name() -> &'static str { "linux" } -#[cfg(target_pointer_width = "32")] +#[cfg(all(target_pointer_width = "32", target_arch = "arm"))] +pub fn platform_arch() -> &'static str { + "armv7l" +} + +#[cfg(all(target_pointer_width = "32", not(target_arch = "arm")))] pub fn platform_arch() -> &'static str { "x86" } -#[cfg(target_pointer_width = "64")] +#[cfg(all(target_pointer_width = "64", target_arch = "arm"))] +pub fn platform_arch() -> &'static str { + "arm64" +} + +#[cfg(all(target_pointer_width = "64", not(target_arch = "arm")))] pub fn platform_arch() -> &'static str { "x64" }