use rbe_autoconfig

pull/18280/head
Nicolas Lopez 6 years ago
parent 906c85b47a
commit d1640057f2
  1. 32
      WORKSPACE
  2. 12
      bazel/grpc_deps.bzl
  3. 42
      third_party/toolchains/BUILD
  4. 8
      tools/remote_build/rbe_common.bazelrc
  5. 2
      tools/run_tests/sanity/check_bazel_workspace.py

@ -60,3 +60,35 @@ git_repository(
load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_repositories")
py_proto_repositories()
load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
# Creates toolchain configuration for remote execution with BuildKite CI
# for rbe_ubuntu1604
rbe_autoconfig(
name = "rbe_default",
)
load("@bazel_toolchains//rules:environments.bzl", "clang_env")
load("@bazel_skylib//lib:dicts.bzl", "dicts")
rbe_autoconfig(
name = "rbe_msan",
env = dicts.add(
clang_env(),
{
"BAZEL_LINKOPTS": "-lc++:-lc++abi:-lm",
},
),
)
rbe_autoconfig(
name = "rbe_ubsan",
env = dicts.add(
clang_env(),
{
"BAZEL_COMPILER": "clang++",
"CC": "clang++",
},
),
)

@ -173,15 +173,15 @@ def grpc_deps():
url = "https://github.com/abseil/abseil-cpp/archive/308ce31528a7edfa39f5f6d36142278a0ae1bf45.tar.gz",
)
if "com_github_bazelbuild_bazeltoolchains" not in native.existing_rules():
if "bazel_toolchains" not in native.existing_rules():
http_archive(
name = "com_github_bazelbuild_bazeltoolchains",
strip_prefix = "bazel-toolchains-37419a124bdb9af2fec5b99a973d359b6b899b61",
name = "bazel_toolchains",
strip_prefix = "bazel-toolchains-d665ccfa3e9c90fa789671bf4ef5f7c19c5715c4",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/37419a124bdb9af2fec5b99a973d359b6b899b61.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/37419a124bdb9af2fec5b99a973d359b6b899b61.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/d665ccfa3e9c90fa789671bf4ef5f7c19c5715c4.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/d665ccfa3e9c90fa789671bf4ef5f7c19c5715c4.tar.gz",
],
sha256 = "ee854b5de299138c1f4a2edb5573d22b21d975acfc7aa938f36d30b49ef97498",
sha256 = "4b1468b254a572dbe134cc1fd7c6eab1618a72acd339749ea343bd8f55c3b7eb",
)
if "bazel_skylib" not in native.existing_rules():

@ -16,34 +16,14 @@ licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
# Latest RBE Ubuntu16_04 container
# Update every time when a new container is released.
alias(
name = "rbe_ubuntu1604",
actual = ":rbe_ubuntu1604_r346485",
)
alias(
name = "rbe_ubuntu1604_large",
actual = ":rbe_ubuntu1604_r346485_large",
)
# RBE Ubuntu16_04 r346485
platform(
name = "rbe_ubuntu1604_r346485",
name = "rbe_ubuntu1604",
parents = ["@rbe_default//config:platform"],
constraint_values = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:linux",
"@bazel_tools//tools/cpp:clang",
"@com_github_bazelbuild_bazeltoolchains//constraints:xenial",
"@com_github_bazelbuild_bazeltoolchains//constraints/sanitizers:support_msan",
"//third_party/toolchains/machine_size:standard",
],
remote_execution_properties = """
properties: {
name: "container-image"
value:"docker://gcr.io/cloud-marketplace/google/rbe-ubuntu16-04@sha256:f3120a030a19d67626ababdac79cc787e699a1aa924081431285118f87e7b375"
}
{PARENT_REMOTE_EXECUTION_PROPERTIES}
properties: {
name: "gceMachineType" # Small machines for majority of tests.
value: "n1-highmem-2"
@ -67,22 +47,14 @@ platform(
""",
)
# RBE Ubuntu16_04 r346485 large
platform(
name = "rbe_ubuntu1604_r346485_large",
name = "rbe_ubuntu1604_large",
parents = ["@rbe_default//config:platform"],
constraint_values = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:linux",
"@bazel_tools//tools/cpp:clang",
"@com_github_bazelbuild_bazeltoolchains//constraints:xenial",
"@com_github_bazelbuild_bazeltoolchains//constraints/sanitizers:support_msan",
"//third_party/toolchains/machine_size:large",
],
remote_execution_properties = """
properties: {
name: "container-image"
value:"docker://gcr.io/cloud-marketplace/google/rbe-ubuntu16-04@sha256:f3120a030a19d67626ababdac79cc787e699a1aa924081431285118f87e7b375"
}
{PARENT_REMOTE_EXECUTION_PROPERTIES}
properties: {
name: "gceMachineType" # Large machines for some resource demanding tests (TSAN).
value: "n1-standard-8"
@ -112,6 +84,6 @@ toolchain(
],
target_compatible_with = [
],
toolchain = "@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.1/bazel_0.20.0/default:cc-compiler-k8",
toolchain = "@rbe_default//cc:cc-compiler-k8",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)

@ -19,7 +19,7 @@
startup --host_jvm_args=-Dbazel.DigestFunction=SHA256
build --crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.1/bazel_0.20.0/default:toolchain
build --crosstool_top=@rbe_default//cc:toolchain
build --extra_toolchains=//third_party/toolchains:cc-toolchain-clang-x86_64-default
# Use custom execution platforms defined in third_party/toolchains
build --extra_execution_platforms=//third_party/toolchains:rbe_ubuntu1604,//third_party/toolchains:rbe_ubuntu1604_large
@ -66,9 +66,9 @@ build:msan --cxxopt=--stdlib=libc++
# setting LD_LIBRARY_PATH is necessary
# to avoid "libc++.so.1: cannot open shared object file"
build:msan --action_env=LD_LIBRARY_PATH=/usr/local/lib
build:msan --host_crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.1/bazel_0.20.0/default:toolchain
build:msan --host_crosstool_top=@rbe_default//cc:toolchain
# override the config-agnostic crosstool_top
build:msan --crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.1/bazel_0.20.0/msan:toolchain
build:msan --crosstool_top=@rbe_msan//cc:toolchain
# thread sanitizer: most settings are already in %workspace%/.bazelrc
# we only need a few additional ones that are Foundry specific
@ -84,7 +84,7 @@ build:ubsan --copt=-gmlt
# TODO(jtattermusch): use more reasonable test timeout
build:ubsan --test_timeout=3600
# override the config-agnostic crosstool_top
--crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/experimental/ubuntu16_04_clang/1.1/bazel_0.20.0/ubsan:toolchain
build:ubsan --crosstool_top=@rbe_ubsan//cc:toolchain
# TODO(jtattermusch): remove this once Foundry adds the env to the docker image.
# ubsan needs symbolizer to work properly, otherwise the suppression file doesn't work
# and we get test failures.

@ -35,7 +35,7 @@ git_submodule_hashes = {
}
_BAZEL_SKYLIB_DEP_NAME = 'bazel_skylib'
_BAZEL_TOOLCHAINS_DEP_NAME = 'com_github_bazelbuild_bazeltoolchains'
_BAZEL_TOOLCHAINS_DEP_NAME = 'bazel_toolchains'
_TWISTED_TWISTED_DEP_NAME = 'com_github_twisted_twisted'
_YAML_PYYAML_DEP_NAME = 'com_github_yaml_pyyaml'
_TWISTED_INCREMENTAL_DEP_NAME = 'com_github_twisted_incremental'

Loading…
Cancel
Save