Fix arm64 packages contain 32-bit executable (#3246)

(cherry picked from commit b8e134cd37)
This commit is contained in:
Daniel Nelson 2017-09-18 14:22:54 -07:00 committed by Daniel Nelson
parent 66cfe80e37
commit c08f492f78
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 4 additions and 0 deletions

View File

@ -274,6 +274,8 @@ def get_system_arch():
arch = "amd64"
elif arch == "386":
arch = "i386"
elif "arm64" in arch:
arch = "arm64"
elif 'arm' in arch:
# Prevent uname from reporting full ARM arch (eg 'armv7l')
arch = "arm"
@ -446,6 +448,8 @@ def build(version=None,
# Handle variations in architecture output
if arch == "i386" or arch == "i686":
arch = "386"
elif "arm64" in arch:
arch = "arm64"
elif "arm" in arch:
arch = "arm"
build_command += "GOOS={} GOARCH={} ".format(platform, arch)