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.
26 lines
752 B
26 lines
752 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-gcc" \ |
|
CXX_FOR_TARGET="arm-linux-androideabi-g++" \ |
|
./make.bash --no-clean |
|
|
|
# Build the Go toolchain for arm64 devices. |
|
GOOS="android" GOARCH="arm64" CGO_ENABLED="1" \ |
|
CC_FOR_TARGET="aarch64-linux-android-gcc" \ |
|
CXX_FOR_TARGET="aarch64-linux-android-g++" \ |
|
./make.bash --no-clean
|
|
|