WORKSPACE 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. workspace(name = "com_github_grpc_grpc")
  2. load("//bazel:grpc_deps.bzl", "grpc_deps", "grpc_test_only_deps")
  3. grpc_deps()
  4. grpc_test_only_deps()
  5. load("//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
  6. grpc_extra_deps()
  7. load("@bazel_toolchains//rules/exec_properties:exec_properties.bzl", "create_rbe_exec_properties_dict", "custom_exec_properties")
  8. custom_exec_properties(
  9. name = "grpc_custom_exec_properties",
  10. constants = {
  11. "LARGE_MACHINE": create_rbe_exec_properties_dict(
  12. labels = {
  13. "os": "ubuntu",
  14. "machine_size": "large",
  15. },
  16. ),
  17. },
  18. )
  19. load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
  20. # Create toolchain configuration for remote execution.
  21. rbe_autoconfig(
  22. name = "rbe_default",
  23. exec_properties = create_rbe_exec_properties_dict(
  24. docker_add_capabilities = "SYS_PTRACE",
  25. docker_privileged = True,
  26. labels = {
  27. "os": "ubuntu",
  28. "machine_size": "small",
  29. },
  30. os_family = "Linux",
  31. ),
  32. # use exec_properties instead of deprecated remote_execution_properties
  33. use_legacy_platform_definition = False,
  34. )
  35. load("@bazel_toolchains//rules:environments.bzl", "clang_env")
  36. load("@bazel_skylib//lib:dicts.bzl", "dicts")
  37. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
  38. http_archive(
  39. name = "build_bazel_rules_android",
  40. sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
  41. strip_prefix = "rules_android-0.1.1",
  42. urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"],
  43. )
  44. load("//third_party/android:android_configure.bzl", "android_configure")
  45. android_configure(name = "local_config_android")
  46. load("@local_config_android//:android_configure.bzl", "android_workspace")
  47. android_workspace()
  48. # Prevents bazel's '...' expansion from including the following folder.
  49. # This is required because the BUILD file in the following folder
  50. # will trigger bazel failure when Android SDK is not configured.
  51. # The targets in the following folder need to be included in APK and will
  52. # be invoked by binder transport implementation through JNI.
  53. local_repository(
  54. name = "binder_transport_android_helper",
  55. path = "./src/core/ext/transport/binder/java",
  56. )
  57. # Create msan toolchain configuration for remote execution.
  58. rbe_autoconfig(
  59. name = "rbe_msan",
  60. env = dicts.add(
  61. clang_env(),
  62. {
  63. "BAZEL_LINKOPTS": "-lc++:-lc++abi:-lm",
  64. },
  65. ),
  66. )
  67. load("@io_bazel_rules_python//python:pip.bzl", "pip_install")
  68. pip_install(
  69. name = "grpc_python_dependencies",
  70. requirements = "@com_github_grpc_grpc//:requirements.bazel.txt",
  71. )