You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
764 B
27 lines
764 B
#!/bin/bash
|
|
set -e -o pipefail
|
|
|
|
# This script builds the go cross compilers for Android targets.
|
|
#
|
|
# Usage: build_go
|
|
#
|
|
# It assumes that the "arm-linux-androideabi" toolchain is already installed.
|
|
# It assumes that the "aarch64-linux-android" toolchain is already installed.
|
|
|
|
if [[ ! -e "make.bash" && -e "src/make.bash" ]]
|
|
then
|
|
cd src
|
|
fi
|
|
|
|
# Build the Go toolchain for arm devices.
|
|
GOOS="android" GOARCH="arm" CGO_ENABLED="1" \
|
|
CC_FOR_TARGET="arm-linux-androideabi-clang" \
|
|
CXX_FOR_TARGET="arm-linux-androideabi-clang++" \
|
|
./make.bash --no-clean
|
|
|
|
# Build the Go toolchain for arm64 devices.
|
|
GOOS="android" GOARCH="arm64" CGO_ENABLED="1" \
|
|
CC_FOR_TARGET="aarch64-linux-android-clang" \
|
|
CXX_FOR_TARGET="aarch64-linux-android-clang++" \
|
|
./make.bash --no-clean
|