Skip to content

Commit

Permalink
feat(cli.rs): support tauri build on M1 chip (#1915)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemeowx2 committed May 29, 2021
1 parent e85472b commit 3bf853d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/build-on-m1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cli.rs": patch
---

Support `cargo tauri build` on Apple M1 chip.
2 changes: 2 additions & 0 deletions core/tauri-utils/src/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down
2 changes: 2 additions & 0 deletions tooling/bundler/src/bundle/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3bf853d

Please sign in to comment.