diff --git a/proto/swift_proto_utils.bzl b/proto/swift_proto_utils.bzl index d459bd85d..df44a40bd 100644 --- a/proto/swift_proto_utils.bzl +++ b/proto/swift_proto_utils.bzl @@ -270,12 +270,12 @@ def compile_swift_protos_for_target( compile_result = swift_common.compile( actions = ctx.actions, cc_infos = get_providers(compiler_deps, CcInfo), - copts = ["-parse-as-library"], + copts = ["-parse-as-library"] + getattr(attr, "copts", []), feature_configuration = feature_configuration, include_dev_srch_paths = include_dev_srch_paths, module_name = module_name, objc_infos = get_providers(compiler_deps, apple_common.Objc), - package_name = None, + package_name = getattr(attr, "package_name", None), srcs = generated_swift_srcs, swift_toolchain = swift_toolchain, swift_infos = get_providers(compiler_deps, SwiftInfo),