@@ -13,7 +13,7 @@ The macro additionally creates toolchain target when toolchain_type is given.
1313load ("//bazel/private:proto_toolchain_rule.bzl" , _proto_toolchain_rule = "proto_toolchain" )
1414load ("//bazel/private:toolchain_helpers.bzl" , "toolchains" )
1515
16- def proto_toolchain (* , name , proto_compiler , exec_compatible_with = []):
16+ def proto_toolchain (* , name , proto_compiler , exec_compatible_with = [], target_compatible_with = [] ):
1717 """Creates a proto_toolchain and toolchain target for proto_library.
1818
1919 Toolchain target is suffixed with "_toolchain".
@@ -22,13 +22,14 @@ def proto_toolchain(*, name, proto_compiler, exec_compatible_with = []):
2222 name: name of the toolchain
2323 proto_compiler: (Label) of either proto compiler sources or prebuild binaries
2424 exec_compatible_with: ([constraints]) List of constraints the prebuild binary is compatible with.
25+ target_compatible_with: ([constraints]) List of constraints the target it is compatible with.
2526 """
2627 _proto_toolchain_rule (name = name , proto_compiler = proto_compiler )
2728
2829 native .toolchain (
2930 name = name + "_toolchain" ,
3031 toolchain_type = toolchains .PROTO_TOOLCHAIN ,
3132 exec_compatible_with = exec_compatible_with ,
32- target_compatible_with = [] ,
33+ target_compatible_with = target_compatible_with ,
3334 toolchain = name ,
3435 )
0 commit comments