1workspace(name = "com_github_grpc_grpc") 2 3load("//bazel:grpc_deps.bzl", "grpc_deps", "grpc_test_only_deps") 4 5grpc_deps() 6 7grpc_test_only_deps() 8 9load("//bazel:grpc_extra_deps.bzl", "grpc_extra_deps") 10 11grpc_extra_deps() 12 13register_execution_platforms( 14 "//third_party/toolchains:rbe_windows", 15) 16 17register_toolchains( 18 "//third_party/toolchains/bazel_0.26.0_rbe_windows:cc-toolchain-x64_windows", 19) 20 21load("@bazel_toolchains//rules/exec_properties:exec_properties.bzl", "create_exec_properties_dict", "custom_exec_properties", "merge_dicts") 22 23custom_exec_properties( 24 name = "grpc_custom_exec_properties", 25 constants = { 26 "LARGE_MACHINE": merge_dicts( 27 create_exec_properties_dict(), 28 # TODO(jtattermusch): specifying 'labels = {"abc": "xyz"}' in create_exec_properties_dict 29 # is not possible without https://github.com/bazelbuild/bazel-toolchains/pull/748 30 # and currently the toolchain we're using is too old for that. To be able to select worker 31 # pools through labels, we use a workaround and populate the corresponding label values 32 # manually (see create_exec_properties_dict logic for how labels get transformed) 33 # Remove this workaround once we transition to a new-enough bazel toolchain. 34 # The next line corresponds to 'labels = {"os": "ubuntu", "machine_size": "large"}' 35 { 36 "label:os": "ubuntu", 37 "label:machine_size": "large", 38 }, 39 ), 40 }, 41) 42 43load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig") 44 45# Create toolchain configuration for remote execution. 46rbe_autoconfig( 47 name = "rbe_default", 48 exec_properties = merge_dicts( 49 create_exec_properties_dict( 50 docker_add_capabilities = "SYS_PTRACE", 51 docker_privileged = True, 52 os_family = "Linux", 53 ), 54 # TODO(jtattermusch): specifying 'labels = {"abc": "xyz"}' in create_exec_properties_dict 55 # is not possible without https://github.com/bazelbuild/bazel-toolchains/pull/748 56 # and currently the toolchain we're using is too old for that. To be able to select worker 57 # pools through labels, we use a workaround and populate the corresponding label values 58 # manually (see create_exec_properties_dict logic for how labels get transformed) 59 # Remove this workaround once we transition to a new-enough bazel toolchain. 60 # The next line corresponds to 'labels = {"os": "ubuntu", "machine_size": "small"}' 61 { 62 "label:os": "ubuntu", 63 "label:machine_size": "small", 64 }, 65 ), 66 # use exec_properties instead of deprecated remote_execution_properties 67 use_legacy_platform_definition = False, 68) 69 70load("@bazel_toolchains//rules:environments.bzl", "clang_env") 71load("@bazel_skylib//lib:dicts.bzl", "dicts") 72 73# Create msan toolchain configuration for remote execution. 74rbe_autoconfig( 75 name = "rbe_msan", 76 env = dicts.add( 77 clang_env(), 78 { 79 "BAZEL_LINKOPTS": "-lc++:-lc++abi:-lm", 80 }, 81 ), 82) 83 84load("@io_bazel_rules_python//python:pip.bzl", "pip_import", "pip_repositories") 85 86pip_import( 87 name = "grpc_python_dependencies", 88 requirements = "@com_github_grpc_grpc//:requirements.bazel.txt", 89) 90 91load("@grpc_python_dependencies//:requirements.bzl", "pip_install") 92 93pip_repositories() 94 95pip_install() 96