1load("//bazel/toolchains:proto_lang_toolchain.bzl", "proto_lang_toolchain") 2 3package( 4 default_applicable_licenses = ["//:license"], 5 default_visibility = ["//visibility:public"], 6) 7 8proto_lang_toolchain( 9 name = "toolchain", 10 blacklisted_protos = [":denied"], 11 command_line = "--java_out=param1,param2:$(OUT)", 12 mnemonic = "MyMnemonic", 13 plugin = ":plugin", 14 plugin_format_flag = "--plugin=%s", 15 progress_message = "Progress Message %{label}", 16 runtime = ":runtime", 17 tags = [ 18 "manual", 19 "nobuilder", 20 "notap", 21 ], 22) 23 24proto_lang_toolchain( 25 name = "toolchain_noplugin", 26 blacklisted_protos = [":denied"], 27 command_line = "--java_out=param1,param2:$(OUT)", 28 mnemonic = "MyMnemonic", 29 progress_message = "Progress Message %{label}", 30 runtime = ":runtime", 31 tags = [ 32 "manual", 33 "nobuilder", 34 "notap", 35 ], 36) 37 38cc_binary( 39 name = "plugin", 40 srcs = ["plugin.cc"], 41 tags = [ 42 "manual", 43 "nobuilder", 44 "notap", 45 ], 46) 47 48cc_library( 49 name = "runtime", 50 srcs = ["runtime.cc"], 51 tags = [ 52 "manual", 53 "nobuilder", 54 "notap", 55 ], 56) 57 58filegroup( 59 name = "descriptors", 60 srcs = [ 61 "descriptor.proto", 62 "metadata.proto", 63 ], 64 tags = [ 65 "manual", 66 "nobuilder", 67 "notap", 68 ], 69) 70 71filegroup( 72 name = "any", 73 srcs = ["any.proto"], 74 tags = [ 75 "manual", 76 "nobuilder", 77 "notap", 78 ], 79) 80 81filegroup( 82 name = "something", 83 srcs = ["something.proto"], 84 tags = [ 85 "manual", 86 "nobuilder", 87 "notap", 88 ], 89) 90 91proto_library( 92 name = "mixed", 93 srcs = [ 94 ":descriptors", 95 ":something", 96 ], 97 tags = [ 98 "manual", 99 "nobuilder", 100 "notap", 101 ], 102) 103 104proto_library( 105 name = "denied", 106 srcs = [ 107 ":any", 108 ":descriptors", 109 ], 110 tags = [ 111 "manual", 112 "nobuilder", 113 "notap", 114 ], 115) 116 117cc_binary( 118 name = "_tool1", 119 srcs = ["tool1.cc"], 120 tags = [ 121 "manual", 122 "nobuilder", 123 "notap", 124 ], 125) 126 127cc_binary( 128 name = "_tool2", 129 srcs = ["tool2.cc"], 130 tags = [ 131 "manual", 132 "nobuilder", 133 "notap", 134 ], 135) 136