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

Commit

Permalink
Make the strict include paths from objc_proto_library targets avail…
Browse files Browse the repository at this point in the history
…able so headers can be found when `swift_clang_module_aspect` compiles a module.

`swift_clang_module_aspect` assumes that CcInfo contains all of the necessary compiler flags to be able to find the headers that are used when compiling an explicit module. This is true for all flags except the header search path in the Objc provider's `strict_include` field. This means that the `strict_include` field needs to be explicitly translated to an equivalent CcInfo when compiling the module.

PiperOrigin-RevId: 370991285
  • Loading branch information
Googler authored and swiple-rules-gardener committed Apr 28, 2021
1 parent 3e53aa2 commit 1aca023
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions swift/internal/swift_clang_module_aspect.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,14 @@ def _handle_module(
compilation_context = dep[CcInfo].compilation_context,
),
)
if apple_common.Objc in dep:
target_and_deps_cc_infos.append(
CcInfo(
compilation_context = cc_common.create_compilation_context(
includes = dep[apple_common.Objc].strict_include,
),
),
)

compilation_context_to_compile = cc_common.merge_cc_infos(
direct_cc_infos = target_and_deps_cc_infos,
Expand Down

0 comments on commit 1aca023

Please sign in to comment.