Handle uname -m returning arm64

This commit is contained in:
Richard van der Hoff 2024-12-11 22:29:35 +00:00
parent 3e58c7aafd
commit 56a5f55e18
2 changed files with 4 additions and 1 deletions

View file

@ -132,7 +132,7 @@ Prerequisites:
```
* Install the Android Rust toolchain for your machine's hardware:
```
rustup target add `uname -m`-linux-android
rustup target add aarch64-linux-android x86_64-linux-android
```
* Depending on the location of the Android SDK, you may need to set
`ANDROID_HOME`:

View file

@ -60,6 +60,9 @@ buildApp=${buildApp:-no}
cd "${elementPwd}"
default_arch="$(uname -m)-linux-android"
# On ARM MacOS, `uname -m` returns arm64, but the toolchain is called aarch64
default_arch="${default_arch/arm64/aarch64}"
read -p "Enter the architecture you want to build for (default '$default_arch'): " target_arch
target_arch="${target_arch:-${default_arch}}"