From 6fe5db24c9e663096f891ab3aa0b6b458666cbeb Mon Sep 17 00:00:00 2001 From: patr0nus Date: Sat, 15 Jan 2022 10:49:53 +0800 Subject: [PATCH] Update build script for apple sillicon --- nodejs/build.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nodejs/build.rs b/nodejs/build.rs index e8da7db..414183d 100644 --- a/nodejs/build.rs +++ b/nodejs/build.rs @@ -20,6 +20,7 @@ enum TargetOS { enum TargetArch { X64, X86, + Arm64, } #[derive(Debug, Copy, Clone)] @@ -127,6 +128,7 @@ fn main() -> anyhow::Result<()> { let arch = match env::var("CARGO_CFG_TARGET_ARCH")?.as_str() { "x86" => Ok(TargetArch::X86), "x86_64" => Ok(TargetArch::X64), + "aarch64" => Ok(TargetArch::Arm64), other => Err(other.to_string()), }; if let Ok(TargetOS::Win32) = os {