1load("//bazel/toolchains:proto_lang_toolchain.bzl", "proto_lang_toolchain") 2load("//bazel/toolchains:proto_toolchain.bzl", "proto_toolchain") 3 4# Keep this file as small as possible and free of any unnecessary loads 5# It is loaded by every use of protobuf repository, and loads here can force 6# fetching of additional external repositories 7 8# It's also intentionally using toolchain instead of proto_lang_toolchain, 9# because the former does not resolve dependencies until toolchain resolution 10# needs them 11 12proto_toolchain( 13 name = "protoc_sources", 14 exec_compatible_with = [], 15 proto_compiler = "//:protoc", 16) 17 18toolchain( 19 name = "cc_source_toolchain", 20 exec_compatible_with = [], 21 target_compatible_with = [], 22 toolchain = "//:cc_toolchain", 23 toolchain_type = "//bazel/private:cc_toolchain_type", 24) 25 26toolchain( 27 name = "java_source_toolchain", 28 exec_compatible_with = [], 29 target_compatible_with = [], 30 toolchain = "//java/core:toolchain", 31 toolchain_type = "//bazel/private:java_toolchain_type", 32) 33 34toolchain( 35 name = "javalite_source_toolchain", 36 exec_compatible_with = [], 37 target_compatible_with = [], 38 toolchain = "//java/lite:toolchain", 39 toolchain_type = "//bazel/private:javalite_toolchain_type", 40) 41 42toolchain( 43 name = "python_source_toolchain", 44 exec_compatible_with = [], 45 target_compatible_with = [], 46 toolchain = "//python:python_toolchain", 47 toolchain_type = "//bazel/private:python_toolchain_type", 48) 49 50# Following toolchain registrations are for builtin Bazel 7 rules 51# which defined them in other repositories. 52toolchain( 53 name = "cc_source_toolchain_bazel7", 54 exec_compatible_with = [], 55 target_compatible_with = [], 56 toolchain = "//:cc_toolchain", 57 toolchain_type = "@rules_cc//cc/proto:toolchain_type", 58) 59 60toolchain( 61 name = "java_source_toolchain_bazel7", 62 exec_compatible_with = [], 63 target_compatible_with = [], 64 toolchain = "//java/core:toolchain", 65 toolchain_type = "@rules_java//java/proto:toolchain_type", 66) 67 68toolchain( 69 name = "javalite_source_toolchain_bazel7", 70 exec_compatible_with = [], 71 target_compatible_with = [], 72 toolchain = "//java/lite:toolchain", 73 toolchain_type = "@rules_java//java/proto:lite_toolchain_type", 74) 75 76filegroup( 77 name = "for_bazel_tests", 78 testonly = True, 79 srcs = [ 80 "BUILD.bazel", 81 ], 82 visibility = [ 83 "//bazel/private:__pkg__", 84 ], 85) 86