Skip to content

Commit

Permalink
added 386
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed May 31, 2024
1 parent 4b3ac15 commit 146b32e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ COPY --from=build-termux /usr/local/go/ /usr/local/go-termux/

RUN apt-get update && apt-get install -y sdkmanager
ENV NDK_VERSION r26d
ENV ANDROID_VERSION 34
RUN sdkmanager --install "ndk;${NDK_VERSION}"
COPY go-termux.sh /usr/local/bin/go-termux
9 changes: 5 additions & 4 deletions go-termux.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash

bindir=/opt/android-sdk/ndk/${NDK_VERSION}/toolchains/llvm/prebuilt/linux-x86_64/bin
[ "$GOARCH" = "amd64" ] && export CC="$bindir/x86_64-linux-android34-clang"
[ "$GOARCH" = "arm64" ] && export CC="$bindir/aarch64-linux-android34-clang"
[ "$GOARCH" = "arm" ] && export CC="$bindir/armv7a-linux-androideabi34-clang"
bindir="/opt/android-sdk/ndk/${NDK_VERSION}/toolchains/llvm/prebuilt/linux-x86_64/bin"
[ "$GOARCH" = "amd64" ] && export CC="$bindir/x86_64-linux-android${ANDROID_VERSION}-clang"
[ "$GOARCH" = "arm64" ] && export CC="$bindir/aarch64-linux-android${ANDROID_VERSION}-clang"
[ "$GOARCH" = "arm" ] && export CC="$bindir/armv7a-linux-androideabi${ANDROID_VERSION}-clang"
[ "$GOARCH" = "386" ] && export CC="$bindir/i686-linux-android${ANDROID_VERSION}-clang"

exec /usr/local/go-termux/bin/go "$@"

0 comments on commit 146b32e

Please sign in to comment.