Merge pull request #1088 from d3lm/feat/support-aarch64

feat: add support for macos aarch64
master
Jesper Håkansson 3 years ago committed by GitHub
commit 5eb3dffdf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      npm/binary.js
  2. 2
      src/install/mod.rs
  3. 2
      src/target.rs

@ -13,7 +13,7 @@ const getPlatform = () => {
if (type === "Linux" && arch === "x64") {
return "x86_64-unknown-linux-musl";
}
if (type === "Darwin" && arch === "x64") {
if (type === "Darwin" && (arch === "x64" || arch === "arm64")) {
return "x86_64-apple-darwin";
}

@ -172,7 +172,7 @@ fn prebuilt_url(tool: &Tool, version: &str) -> Result<String, failure::Error> {
Tool::WasmOpt => "x86-linux",
_ => bail!("Unrecognized target!"),
}
} else if target::MACOS && target::x86_64 {
} else if target::MACOS && (target::x86_64 || target::aarch64) {
"x86_64-apple-darwin"
} else if target::WINDOWS && target::x86_64 {
match tool {

@ -13,3 +13,5 @@ pub const WINDOWS: bool = cfg!(target_os = "windows");
pub const x86_64: bool = cfg!(target_arch = "x86_64");
#[allow(non_upper_case_globals)]
pub const x86: bool = cfg!(target_arch = "x86");
#[allow(non_upper_case_globals)]
pub const aarch64: bool = cfg!(target_arch = "aarch64");

Loading…
Cancel
Save