WORKSPACE 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. workspace(name = "com_github_grpc_grpc")
  2. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
  3. load("//bazel:grpc_deps.bzl", "grpc_deps", "grpc_test_only_deps")
  4. load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
  5. grpc_deps()
  6. grpc_test_only_deps()
  7. load("//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
  8. grpc_extra_deps()
  9. register_execution_platforms(
  10. "//third_party/toolchains:rbe_windows",
  11. )
  12. register_toolchains(
  13. "//third_party/toolchains/bazel_0.26.0_rbe_windows:cc-toolchain-x64_windows",
  14. )
  15. load("@bazel_toolchains//rules/exec_properties:exec_properties.bzl", "create_exec_properties_dict", "custom_exec_properties")
  16. custom_exec_properties(
  17. name = "grpc_custom_exec_properties",
  18. constants = {
  19. "LARGE_MACHINE": create_exec_properties_dict(gce_machine_type = "n1-standard-8"),
  20. },
  21. )
  22. load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
  23. # Create toolchain configuration for remote execution.
  24. rbe_autoconfig(
  25. name = "rbe_default",
  26. # use exec_properties instead of deprecated remote_execution_properties
  27. use_legacy_platform_definition = False,
  28. exec_properties = create_exec_properties_dict(
  29. # n1-highmem-2 is the default (small machine) machine type. Targets
  30. # that want to use other machines (such as LARGE_MACHINE) will override
  31. # this value.
  32. gce_machine_type = "n1-highmem-2",
  33. docker_add_capabilities = "SYS_PTRACE",
  34. docker_privileged = True,
  35. ),
  36. )
  37. load("@bazel_toolchains//rules:environments.bzl", "clang_env")
  38. load("@bazel_skylib//lib:dicts.bzl", "dicts")
  39. # Create msan toolchain configuration for remote execution.
  40. rbe_autoconfig(
  41. name = "rbe_msan",
  42. env = dicts.add(
  43. clang_env(),
  44. {
  45. "BAZEL_LINKOPTS": "-lc++:-lc++abi:-lm",
  46. },
  47. ),
  48. )
  49. load("@io_bazel_rules_python//python:pip.bzl", "pip_repositories", "pip_import")
  50. pip_import(
  51. name = "grpc_python_dependencies",
  52. requirements = "@com_github_grpc_grpc//:requirements.bazel.txt",
  53. )
  54. load("@io_bazel_rules_python//python:pip.bzl", "pip_repositories")
  55. load("@grpc_python_dependencies//:requirements.bzl", "pip_install")
  56. pip_repositories()
  57. pip_install()