diff options
author | Adin Scannell <ascannell@google.com> | 2020-07-27 15:34:25 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-27 15:36:21 -0700 |
commit | 4b336f16b8fc85807cc852494ef1e105361135c6 (patch) | |
tree | a9e36592a37ee5297a3df09aa90e918b3fdf1bbf /tools | |
parent | 8dbf428a1236f5962077e2506bef365362b953d0 (diff) |
Enable RBE for standard-tests.
PiperOrigin-RevId: 323454998
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bazel.mk | 5 | ||||
-rw-r--r-- | tools/bazeldefs/BUILD | 37 |
2 files changed, 42 insertions, 0 deletions
diff --git a/tools/bazel.mk b/tools/bazel.mk index 54844ebbc..45d6007cf 100644 --- a/tools/bazel.mk +++ b/tools/bazel.mk @@ -74,6 +74,11 @@ FULL_DOCKER_RUN_OPTIONS += --group-add $(KVM_GROUP) endif endif +# Load the appropriate config. +ifneq (,$(BAZEL_CONFIG)) +OPTIONS += --config=$(BAZEL_CONFIG) +endif + bazel-image: load-default @if docker ps --all | grep $(BUILDER_NAME); then docker rm -f $(BUILDER_NAME); fi docker run --user 0:0 --entrypoint "" --name $(BUILDER_NAME) \ diff --git a/tools/bazeldefs/BUILD b/tools/bazeldefs/BUILD index f2f80bae1..3f809065d 100644 --- a/tools/bazeldefs/BUILD +++ b/tools/bazeldefs/BUILD @@ -49,3 +49,40 @@ rbe_toolchain( toolchain = "@bazel_toolchains//configs/ubuntu16_04_clang/10.0.0/bazel_2.0.0/cc:cc-compiler-k8", toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", ) + +# Updated versions of the above, compatible with bazel3. +rbe_platform( + name = "rbe_ubuntu1604_bazel3", + constraint_values = [ + "@bazel_tools//platforms:x86_64", + "@bazel_tools//platforms:linux", + "@bazel_tools//tools/cpp:clang", + "@bazel_toolchains_bazel3//constraints:xenial", + "@bazel_toolchains_bazel3//constraints/sanitizers:support_msan", + ], + remote_execution_properties = """ + properties: { + name: "container-image" + value:"docker://gcr.io/cloud-marketplace/google/rbe-ubuntu16-04@sha256:b516a2d69537cb40a7c6a7d92d0008abb29fba8725243772bdaf2c83f1be2272" + } + properties: { + name: "dockerAddCapabilities" + value: "SYS_ADMIN" + } + properties: { + name: "dockerPrivileged" + value: "true" + } + """, +) + +rbe_toolchain( + name = "cc-toolchain-clang-x86_64-default_bazel3", + exec_compatible_with = [], + tags = [ + "manual", + ], + target_compatible_with = [], + toolchain = "@bazel_toolchains_bazel3//configs/ubuntu16_04_clang/11.0.0/bazel_3.1.0/cc:cc-compiler-k8", + toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", +) |