Skip to content

Commit

Permalink
merge implementation deps compilation contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
LeFrosch committed Oct 22, 2024
1 parent 7e284a0 commit 6db1fa5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions aspect/intellij_info_impl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ DEPS = [
"_cc_toolchain", # From cc rules
"_stl", # From cc rules
"malloc", # From cc_binary rules
"implementation_deps", # From cc_library rules
"_java_toolchain", # From java rules
"deps",
"jars", # from java_import rules
Expand Down Expand Up @@ -514,6 +515,14 @@ def collect_cpp_info(target, ctx, semantics, ide_info, ide_info_file, output_gro

compilation_context = target[CcInfo].compilation_context

# Merge current compilation context with context of implementation dependencies.
if hasattr(ctx.rule.attr, "implementation_deps"):
implementation_deps = ctx.rule.attr.implementation_deps
compilation_context = cc_common.merge_compilation_contexts(
compilation_contexts =
[compilation_context] + [impl[CcInfo].compilation_context for impl in implementation_deps],
)

c_info = struct_omit_none(
header = headers,
source = sources,
Expand Down

0 comments on commit 6db1fa5

Please sign in to comment.