diff options
Diffstat (limited to 'rsync/build.sh')
| -rwxr-xr-x | rsync/build.sh | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/rsync/build.sh b/rsync/build.sh index 1af7fbb..ae4026a 100755 --- a/rsync/build.sh +++ b/rsync/build.sh @@ -23,15 +23,14 @@ if [ -z "$ndk" ] || [ ! -d "$ndk" ]; then echo "rsync: Android NDK not found; set ANDROID_NDK_HOME" >&2 exit 1 fi -# NDK prebuilt toolchains are named by build host, not target. Pick the tag -# matching this machine (macOS ships an x86_64 clang that runs under Rosetta on -# Apple Silicon); the target ABI is selected separately below. -case "$(uname -s)" in -Linux) host_tag=linux-x86_64 ;; -Darwin) host_tag=darwin-x86_64 ;; -*) echo "rsync: unsupported build host $(uname -s)" >&2; exit 1 ;; -esac -tc="$ndk/toolchains/llvm/prebuilt/$host_tag/bin" +# NDK prebuilt toolchains are named by build host, not target; the target ABI is +# selected separately below. ci/setup-toolchain.sh provisions Linux x86_64 only, +# so that is the only host tag worth naming here. +if [ "$(uname -s)" != Linux ] || [ "$(uname -m)" != x86_64 ]; then + echo "rsync: only Linux x86_64 build hosts are supported" >&2 + exit 1 +fi +tc="$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin" if [ ! -d "$tc" ]; then echo "rsync: NDK toolchain not found at $tc" >&2 exit 1 @@ -71,10 +70,8 @@ echo "rsync: verifying sha256" for abi in $ABIS; do case "$abi" in - arm64-v8a) host=aarch64-linux-android cc="aarch64-linux-android${ANDROID_MIN_SDK}-clang" ;; - armeabi-v7a) host=arm-linux-androideabi cc="armv7a-linux-androideabi${ANDROID_MIN_SDK}-clang" ;; - x86_64) host=x86_64-linux-android cc="x86_64-linux-android${ANDROID_MIN_SDK}-clang" ;; - x86) host=i686-linux-android cc="i686-linux-android${ANDROID_MIN_SDK}-clang" ;; + arm64-v8a) host=aarch64-linux-android cc="aarch64-linux-android${ANDROID_MIN_SDK}-clang" ;; + x86_64) host=x86_64-linux-android cc="x86_64-linux-android${ANDROID_MIN_SDK}-clang" ;; *) echo "rsync: unknown ABI $abi" >&2; exit 1 ;; esac |