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

Commit 1aca023

Browse files
Googlerswiple-rules-gardener
Googler
authored andcommitted
Make the strict include paths from objc_proto_library targets available 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
1 parent 3e53aa2 commit 1aca023

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

swift/internal/swift_clang_module_aspect.bzl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,14 @@ def _handle_module(
471471
compilation_context = dep[CcInfo].compilation_context,
472472
),
473473
)
474+
if apple_common.Objc in dep:
475+
target_and_deps_cc_infos.append(
476+
CcInfo(
477+
compilation_context = cc_common.create_compilation_context(
478+
includes = dep[apple_common.Objc].strict_include,
479+
),
480+
),
481+
)
474482

475483
compilation_context_to_compile = cc_common.merge_cc_infos(
476484
direct_cc_infos = target_and_deps_cc_infos,

0 commit comments

Comments
 (0)