Skip to content

Commit

Permalink
Generate module maps for cc_library deps
Browse files Browse the repository at this point in the history
Workaround for not being able to merge the change that adds
`swift_interop_hint` rule.
  • Loading branch information
thii committed Sep 17, 2021
1 parent 589e18f commit 15e8c3d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions swift/internal/swift_clang_module_aspect.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,17 @@ def _module_info_for_target(
attr = aspect_ctx.rule.attr
module_map_file = None

# TODO: Remove once we cherry-pick the `swift_interop_hint` rule
if not module_name and aspect_ctx.rule.kind == "cc_library":
# For all other targets, there is no mechanism to provide a custom
# module map, and we only generate one if the target is tagged.
module_name = _tagged_target_module_name(
label = target.label,
tags = attr.tags,
)
if not module_name:
return None, None

if not module_name:
if apple_common.Objc not in target:
return None, None
Expand Down

0 comments on commit 15e8c3d

Please sign in to comment.