mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-01 15:36:14 +03:00
feat(cli.rs): support tauri build on M1 chip (#1915)
This commit is contained in:
parent
e85472b9e2
commit
3bf853d782
5
.changes/build-on-m1.md
Normal file
5
.changes/build-on-m1.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"cli.rs": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Support `cargo tauri build` on Apple M1 chip.
|
@ -25,6 +25,8 @@ pub fn target_triple() -> crate::Result<String> {
|
|||||||
"x86_64"
|
"x86_64"
|
||||||
} else if cfg!(target_arch = "arm") {
|
} else if cfg!(target_arch = "arm") {
|
||||||
"armv7"
|
"armv7"
|
||||||
|
} else if cfg!(target_arch = "aarch64") {
|
||||||
|
"aarch64"
|
||||||
} else {
|
} else {
|
||||||
return Err(crate::Error::Architecture);
|
return Err(crate::Error::Architecture);
|
||||||
};
|
};
|
||||||
|
@ -18,6 +18,8 @@ pub fn target_triple() -> Result<String, crate::Error> {
|
|||||||
"x86_64"
|
"x86_64"
|
||||||
} else if cfg!(target_arch = "arm") {
|
} else if cfg!(target_arch = "arm") {
|
||||||
"armv7"
|
"armv7"
|
||||||
|
} else if cfg!(target_arch = "aarch64") {
|
||||||
|
"aarch64"
|
||||||
} else {
|
} else {
|
||||||
return Err(crate::Error::ArchError(String::from(
|
return Err(crate::Error::ArchError(String::from(
|
||||||
"Unable to determine target-architecture",
|
"Unable to determine target-architecture",
|
||||||
|
Loading…
Reference in New Issue
Block a user