diff options
author | 2016-12-20 18:19:43 +0000 | |
---|---|---|
committer | 2016-12-21 09:46:46 +0000 | |
commit | aaee64e02fb5d110ccbed0eb903f5f2187071e97 (patch) | |
tree | f8e21836f5a037b3ffaa16411efb89e1eb0463f9 /tools | |
parent | 85b1f112e091cc3316ced14593f804c4aa83e191 (diff) |
Power support
Closes #2139.
--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/2139
PiperOrigin-RevId: 142570236
MOS_MIGRATED_REVID=142570236
Diffstat (limited to 'tools')
-rw-r--r-- | tools/cpp/BUILD | 15 | ||||
-rw-r--r-- | tools/cpp/CROSSTOOL | 4 | ||||
-rw-r--r-- | tools/cpp/cc_configure.bzl | 2 |
3 files changed, 21 insertions, 0 deletions
diff --git a/tools/cpp/BUILD b/tools/cpp/BUILD index a3c8cbe4a4..4e93a314d6 100644 --- a/tools/cpp/BUILD +++ b/tools/cpp/BUILD @@ -38,6 +38,7 @@ cc_toolchain_suite( "local|compiler": ":cc-compiler-local", "x64_windows|compiler": ":cc-compiler-x64_windows", "x64_windows_msvc|compiler": ":cc-compiler-x64_windows_msvc", + "ppc|compiler": ":cc-compiler-ppc", }, ) @@ -56,6 +57,20 @@ cc_toolchain( ) cc_toolchain( + name = "cc-compiler-ppc", + all_files = ":empty", + compiler_files = ":empty", + cpu = "ppc", + dwp_files = ":empty", + dynamic_runtime_libs = [":empty"], + linker_files = ":empty", + objcopy_files = ":empty", + static_runtime_libs = [":empty"], + strip_files = ":empty", + supports_param_files = 1, +) + +cc_toolchain( name = "cc-compiler-armeabi-v7a", all_files = ":empty", compiler_files = ":empty", diff --git a/tools/cpp/CROSSTOOL b/tools/cpp/CROSSTOOL index dd63b3e8b9..0922cf3363 100644 --- a/tools/cpp/CROSSTOOL +++ b/tools/cpp/CROSSTOOL @@ -39,6 +39,10 @@ default_toolchain { toolchain_identifier: "local_linux" } +default_toolchain { + cpu: "ppc" + toolchain_identifier: "local_linux" +} toolchain { abi_version: "armeabi-v7a" abi_libc_version: "armeabi-v7a" diff --git a/tools/cpp/cc_configure.bzl b/tools/cpp/cc_configure.bzl index 2c3b9743a4..8d33a6721a 100644 --- a/tools/cpp/cc_configure.bzl +++ b/tools/cpp/cc_configure.bzl @@ -140,6 +140,8 @@ def _get_cpu_value(repository_ctx): return "x64_windows" # Use uname to figure out whether we are on x86_32 or x86_64 result = repository_ctx.execute(["uname", "-m"]) + if result.stdout.strip() in ["power", "ppc64le", "ppc"]: + return "ppc" return "k8" if result.stdout.strip() in ["amd64", "x86_64", "x64"] else "piii" |