Skip to content

Commit 991d7c6

Browse files
authored
Include swift_proto_library attrs in compilation (#1473)
Using `package_name` or `copt` attributes weren't being propogated down into the actual swiftc compilation.
1 parent 8692bb8 commit 991d7c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

proto/swift_proto_utils.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ def compile_swift_protos_for_target(
263263
compile_result = swift_common.compile(
264264
actions = ctx.actions,
265265
cc_infos = get_providers(compiler_deps, CcInfo),
266-
copts = ["-parse-as-library"],
266+
copts = ["-parse-as-library"] + getattr(attr, "copts", []),
267267
feature_configuration = feature_configuration,
268268
include_dev_srch_paths = include_dev_srch_paths,
269269
module_name = module_name,
270-
package_name = None,
270+
package_name = getattr(attr, "package_name", None),
271271
srcs = generated_swift_srcs,
272272
swift_toolchain = swift_toolchain,
273273
swift_infos = get_providers(compiler_deps, SwiftInfo),

0 commit comments

Comments
 (0)