avoid local runs from accessing remote platforms
This should fix Bazel Basic Tests for Python (Local) and other
local CI runs that are now failing.
I also have a plan to fix Bazel RBE Opt C/C++.
Bazel RBE UBSAN C/C++ might need to wait for gRPC to upgrade to
using 0.23.0
diff --git a/WORKSPACE b/WORKSPACE
index fd77da4..9ed7776 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -9,12 +9,8 @@
grpc_test_only_deps()
register_execution_platforms(
- "//third_party/toolchains:rbe_ubuntu1604",
- "//third_party/toolchains:rbe_ubuntu1604_large",
-)
-
-register_toolchains(
- "//third_party/toolchains:cc-toolchain-clang-x86_64-default",
+ "//third_party/toolchains:local",
+ "//third_party/toolchains:local_large",
)
http_archive(
diff --git a/third_party/toolchains/BUILD b/third_party/toolchains/BUILD
index 9a2eb32..36cfd57 100644
--- a/third_party/toolchains/BUILD
+++ b/third_party/toolchains/BUILD
@@ -78,12 +78,18 @@
""",
)
-toolchain(
- name = "cc-toolchain-clang-x86_64-default",
- exec_compatible_with = [
+platform(
+ name = "local",
+ parents = ["@bazel_tools//platforms:target_platform"],
+ constraint_values = [
+ "//third_party/toolchains/machine_size:standard",
],
- target_compatible_with = [
+)
+
+platform(
+ name = "local_large",
+ parents = ["@bazel_tools//platforms:target_platform"],
+ constraint_values = [
+ "//third_party/toolchains/machine_size:large",
],
- toolchain = "@rbe_default//cc:cc-compiler-k8",
- toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
diff --git a/tools/remote_build/rbe_common.bazelrc b/tools/remote_build/rbe_common.bazelrc
index fb74af0..871f1d5 100644
--- a/tools/remote_build/rbe_common.bazelrc
+++ b/tools/remote_build/rbe_common.bazelrc
@@ -20,7 +20,7 @@
startup --host_jvm_args=-Dbazel.DigestFunction=SHA256
build --crosstool_top=@rbe_default//cc:toolchain
-build --extra_toolchains=//third_party/toolchains:cc-toolchain-clang-x86_64-default
+build --extra_toolchains=@rbe_default//config:cc-toolchain
# Use custom execution platforms defined in third_party/toolchains
build --extra_execution_platforms=//third_party/toolchains:rbe_ubuntu1604,//third_party/toolchains:rbe_ubuntu1604_large
build --host_platform=//third_party/toolchains:rbe_ubuntu1604