feat(cli.rs): support tauri build on M1 chip (#1915)

This commit is contained in:
imspace 2021-05-29 12:21:24 +08:00 committed by GitHub
parent e85472b9e2
commit 3bf853d782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

5
.changes/build-on-m1.md Normal file
View File

@ -0,0 +1,5 @@
---
"cli.rs": patch
---
Support `cargo tauri build` on Apple M1 chip.

View File

@ -25,6 +25,8 @@ pub fn target_triple() -> crate::Result<String> {
"x86_64"
} else if cfg!(target_arch = "arm") {
"armv7"
} else if cfg!(target_arch = "aarch64") {
"aarch64"
} else {
return Err(crate::Error::Architecture);
};

View File

@ -18,6 +18,8 @@ pub fn target_triple() -> Result<String, crate::Error> {
"x86_64"
} else if cfg!(target_arch = "arm") {
"armv7"
} else if cfg!(target_arch = "aarch64") {
"aarch64"
} else {
return Err(crate::Error::ArchError(String::from(
"Unable to determine target-architecture",