aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/cpp/BUILD15
-rw-r--r--tools/cpp/CROSSTOOL4
-rw-r--r--tools/cpp/cc_configure.bzl2
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"