Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm64 support on Linux #1550

Merged
merged 13 commits into from
Sep 26, 2018
Merged
2 changes: 1 addition & 1 deletion go/platform/list.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ GOARCH = {
"amd64": "@bazel_tools//platforms:x86_64",
"amd64p32": None,
"arm": "@bazel_tools//platforms:arm",
"arm64": None,
"arm64": "@bazel_tools//platforms:aarch64",
"mips": None,
"mips64": None,
"mips64le": None,
Expand Down
10 changes: 10 additions & 0 deletions go/private/sdk.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ def _detect_host_platform(ctx):
host = "linux_ppc64le"
elif uname == "i686":
host = "linux_386"
# uname -p is not working on Aarch64 boards
res = ctx.execute(["uname", "-m"])
if res.return_code == 0:
uname = res.stdout.strip()
if uname == "aarch64":
host = "linux_arm64"
elif uname == "armv6l":
host = "linux_armv6l"
elif uname == "armv7l":
host = "linux_armv6l"

# Default to amd64 when uname doesn't return a known value.

Expand Down