diff options
author | Arielle Albon <arielle@hopeless-newbie.co.uk> | 2018-06-20 05:51:18 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-20 05:53:02 -0700 |
commit | 886d01c89fca32e46f5841081eb3288e5b4f313b (patch) | |
tree | 99d3601c166bc492637542cab9babe8b495af730 /tools | |
parent | 7508195014ccbe63069fa9b51835ce26019df8ee (diff) |
Add Arm64 support
Based on work of Sun Zhiyi <zhiyisun@gmail.com>.
Closes #5360.
PiperOrigin-RevId: 201339882
Diffstat (limited to 'tools')
-rw-r--r-- | tools/cpp/lib_cc_configure.bzl | 4 | ||||
-rw-r--r-- | tools/platforms/BUILD | 7 | ||||
-rw-r--r-- | tools/platforms/platforms.BUILD | 7 |
3 files changed, 17 insertions, 1 deletions
diff --git a/tools/cpp/lib_cc_configure.bzl b/tools/cpp/lib_cc_configure.bzl index d7a46a3428..ebb0a05e50 100644 --- a/tools/cpp/lib_cc_configure.bzl +++ b/tools/cpp/lib_cc_configure.bzl @@ -188,8 +188,10 @@ def get_cpu_value(repository_ctx): result = repository_ctx.execute(["uname", "-m"]) if result.stdout.strip() in ["power", "ppc64le", "ppc", "ppc64"]: return "ppc" - if result.stdout.strip() in ["arm", "armv7l", "aarch64"]: + if result.stdout.strip() in ["arm", "armv7l"]: return "arm" + if result.stdout.strip() in ["aarch64"]: + return "aarch64" return "k8" if result.stdout.strip() in ["amd64", "x86_64", "x64"] else "piii" def is_cc_configure_debug(repository_ctx): diff --git a/tools/platforms/BUILD b/tools/platforms/BUILD index 4323b33544..960c013290 100644 --- a/tools/platforms/BUILD +++ b/tools/platforms/BUILD @@ -40,6 +40,11 @@ constraint_value( ) constraint_value( + name = "aarch64", + constraint_setting = ":cpu", +) + +constraint_value( name = "s390x", constraint_setting = ":cpu", ) @@ -107,6 +112,7 @@ platform( ":x86_64", ":ppc", ":arm", + ":aarch64", ":s390x", ], host_platform = True, @@ -128,6 +134,7 @@ platform( ":x86_64", ":ppc", ":arm", + ":aarch64", ":s390x", ], os_constraints = [ diff --git a/tools/platforms/platforms.BUILD b/tools/platforms/platforms.BUILD index 5ff4ba804b..775bea748d 100644 --- a/tools/platforms/platforms.BUILD +++ b/tools/platforms/platforms.BUILD @@ -28,6 +28,11 @@ constraint_value( ) constraint_value( + name = "aarch64", + constraint_setting = ":cpu", +) + +constraint_value( name = "s390x", constraint_setting = ":cpu", ) @@ -95,6 +100,7 @@ platform( ":x86_64", ":ppc", ":arm", + ":aarch64", ":s390x", ], host_platform = True, @@ -116,6 +122,7 @@ platform( ":x86_64", ":ppc", ":arm", + ":aarch64", ":s390x", ], os_constraints = [ |