From c2f34d654943f2d75a549763d9d5ad086b56da3f Mon Sep 17 00:00:00 2001 From: Jingwen Chen Date: Fri, 6 Sep 2024 02:16:15 -0700 Subject: [PATCH] Automated rollback of commit 76794bf3adceefcd69a2eb5785635a084fbe2e32. PiperOrigin-RevId: 671679277 --- bazel/private/bazel_proto_library_rule.bzl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bazel/private/bazel_proto_library_rule.bzl b/bazel/private/bazel_proto_library_rule.bzl index cdf1a832e340e..b02f691f45e37 100644 --- a/bazel/private/bazel_proto_library_rule.bzl +++ b/bazel/private/bazel_proto_library_rule.bzl @@ -166,7 +166,8 @@ def _write_descriptor_set(ctx, proto_info, deps, exports, descriptor_set): if ctx.attr._experimental_proto_descriptor_sets_include_source_info[BuildSettingInfo].value: args.add("--include_source_info") - args.add("--retain_options") + if hasattr(ctx.attr, "_retain_options") and ctx.attr._retain_options: + args.add("--retain_options") strict_deps = ctx.attr._strict_proto_deps[BuildSettingInfo].value if strict_deps: