summaryrefslogtreecommitdiffhomepage
path: root/BUILD
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-01-27 10:04:07 -0800
committergVisor bot <gvisor-bot@google.com>2020-01-27 12:21:00 -0800
commitd29e59af9fbd420e34378bcbf7ae543134070217 (patch)
treeaff60c95c843048d194a8317d200f2f2c2d210df /BUILD
parent6b43cf791a74a746443f70f98d859c1246f87e2a (diff)
Standardize on tools directory.
PiperOrigin-RevId: 291745021
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD49
1 files changed, 46 insertions, 3 deletions
diff --git a/BUILD b/BUILD
index 76286174f..5fd929378 100644
--- a/BUILD
+++ b/BUILD
@@ -1,8 +1,8 @@
-package(licenses = ["notice"]) # Apache 2.0
-
load("@io_bazel_rules_go//go:def.bzl", "go_path", "nogo")
load("@bazel_gazelle//:def.bzl", "gazelle")
+package(licenses = ["notice"])
+
# The sandbox filegroup is used for sandbox-internal dependencies.
package_group(
name = "sandbox",
@@ -49,9 +49,52 @@ gazelle(name = "gazelle")
# live in the tools subdirectory (unless they are standard).
nogo(
name = "nogo",
- config = "tools/nogo.js",
+ config = "//tools:nogo.js",
visibility = ["//visibility:public"],
deps = [
"//tools/checkunsafe",
],
)
+
+# We need to define a bazel platform and toolchain to specify dockerPrivileged
+# and dockerRunAsRoot options, they are required to run tests on the RBE
+# cluster in Kokoro.
+alias(
+ name = "rbe_ubuntu1604",
+ actual = ":rbe_ubuntu1604_r346485",
+)
+
+platform(
+ name = "rbe_ubuntu1604_r346485",
+ constraint_values = [
+ "@bazel_tools//platforms:x86_64",
+ "@bazel_tools//platforms:linux",
+ "@bazel_tools//tools/cpp:clang",
+ "@bazel_toolchains//constraints:xenial",
+ "@bazel_toolchains//constraints/sanitizers:support_msan",
+ ],
+ remote_execution_properties = """
+ properties: {
+ name: "container-image"
+ value:"docker://gcr.io/cloud-marketplace/google/rbe-ubuntu16-04@sha256:93f7e127196b9b653d39830c50f8b05d49ef6fd8739a9b5b8ab16e1df5399e50"
+ }
+ properties: {
+ name: "dockerAddCapabilities"
+ value: "SYS_ADMIN"
+ }
+ properties: {
+ name: "dockerPrivileged"
+ value: "true"
+ }
+ """,
+)
+
+toolchain(
+ name = "cc-toolchain-clang-x86_64-default",
+ exec_compatible_with = [
+ ],
+ target_compatible_with = [
+ ],
+ 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",
+)