Rework well_known_protos attr, and some other fixes
diff --git a/bazel/generate_cc.bzl b/bazel/generate_cc.bzl
index d05509f..7fffb58 100644
--- a/bazel/generate_cc.bzl
+++ b/bazel/generate_cc.bzl
@@ -57,7 +57,7 @@
return struct(files=set(out_files))
-generate_cc = rule(
+_generate_cc = rule(
attrs = {
"srcs": attr.label_list(
mandatory = True,
@@ -90,3 +90,9 @@
output_to_genfiles = True,
implementation = generate_cc_impl,
)
+
+def generate_cc(well_known_protos, **kwargs):
+ if well_known_protos:
+ _generate_cc(well_known_protos="@com_google_protobuf//:well_known_protos", **kwargs)
+ else:
+ _generate_cc(**kwargs)