mirror of
https://github.com/apernet/hysteria.git
synced 2025-04-03 04:27:39 +03:00
chore: minor tweaks to the android build
This commit is contained in:
parent
a28234a21a
commit
5a7dfd8a3b
2 changed files with 18 additions and 11 deletions
17
hyperbole.py
17
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"
|
||||
|
||||
|
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue