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

Commit

Permalink
Distinguish between direct and transitive information when creating t…
Browse files Browse the repository at this point in the history
…he `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
  • Loading branch information
allevato authored and swiple-rules-gardener committed Mar 17, 2021
1 parent 1bcdd57 commit 027e180
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion swift/internal/utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ def create_cc_info(
linking_context = full_private_cc_info.linking_context,
))

return cc_common.merge_cc_infos(cc_infos = local_cc_infos + cc_infos)
return cc_common.merge_cc_infos(
cc_infos = cc_infos,
direct_cc_infos = local_cc_infos,
)

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

0 comments on commit 027e180

Please sign in to comment.