diff --git a/hyperbole.py b/hyperbole.py index 97367ba..3262940 100755 --- a/hyperbole.py +++ b/hyperbole.py @@ -168,6 +168,7 @@ def get_app_platforms(): result.append((parts[0], parts[1])) return result + def cmd_build(pprof=False, release=False): if not check_build_env(): return @@ -211,15 +212,21 @@ def cmd_build(pprof=False, release=False): env["GOARCH"] = arch if os_name == "android": env["CGO_ENABLED"] = "1" - ANDROID_NDK_HOME = os.environ.get("ANDROID_NDK_HOME") + "/toolchains/llvm/prebuilt/linux-x86_64/bin" - if arch == "arm64" : + ANDROID_NDK_HOME = ( + os.environ.get("ANDROID_NDK_HOME") + + "/toolchains/llvm/prebuilt/linux-x86_64/bin" + ) + if arch == "arm64": env["CC"] = ANDROID_NDK_HOME + "/aarch64-linux-android33-clang" - if arch == "armv7" : + elif arch == "armv7": env["CC"] = ANDROID_NDK_HOME + "/armv7a-linux-androideabi33-clang" - if arch == "386" : + elif arch == "386": env["CC"] = ANDROID_NDK_HOME + "/i686-linux-android33-clang" - if arch == "amd64" : + elif arch == "amd64": env["CC"] = ANDROID_NDK_HOME + "/x86_64-linux-android33-clang" + else: + print("Unsupported arch for android: %s" % arch) + return else: env["CGO_ENABLED"] = "0" diff --git a/platforms.txt b/platforms.txt index 9b6f677..8b971aa 100644 --- a/platforms.txt +++ b/platforms.txt @@ -22,15 +22,15 @@ linux/s390x linux/mipsle linux/mipsle-sf +# Android +android/386 +android/amd64 +android/armv7 +android/arm64 + # FreeBSD freebsd/amd64 freebsd/amd64-avx freebsd/386 freebsd/arm freebsd/arm64 - -# Android -android/386 -android/amd64 -android/armv7 -android/arm64 \ No newline at end of file