Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Commit 027e180

Browse files
allevatoswiple-rules-gardener
authored andcommitted
Distinguish between direct and transitive information when creating the CcInfo for a swift_library.
This ensures that, for a `swift_library` target `t`, reading from either the direct fields of `t[CcInfo].compilation_context` or `t[SwiftInfo].direct_modules[...].clang.compilation_context` produces consistent results. PiperOrigin-RevId: 363418185
1 parent 1bcdd57 commit 027e180

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

swift/internal/utils.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ def create_cc_info(
126126
linking_context = full_private_cc_info.linking_context,
127127
))
128128

129-
return cc_common.merge_cc_infos(cc_infos = local_cc_infos + cc_infos)
129+
return cc_common.merge_cc_infos(
130+
cc_infos = cc_infos,
131+
direct_cc_infos = local_cc_infos,
132+
)
130133

131134
def expand_locations(ctx, values, targets = []):
132135
"""Expands the `$(location)` placeholders in each of the given values.

0 commit comments

Comments
 (0)