Skip to content

Commit

Permalink
Move cpp_utils to compilation_contexts (#109)
Browse files Browse the repository at this point in the history
Move cpp_utils from the cc_common.compile private_hdrs parameter
to the compilation_contexts parameter in order to fix the
cpp_utils header include paths when Emboss is an external repository.

Fixes #108
  • Loading branch information
BenjaminLawson authored Feb 14, 2024
1 parent 9f8115b commit 2014655
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ def _cc_emboss_aspect_impl(target, ctx):
transitive = [
dep[EmbossCcHeaderInfo].transitive_headers
for dep in ctx.rule.attr.deps
] +
[runtime_cc_info.compilation_context.headers],
],
)
(cc_compilation_context, cc_compilation_outputs) = cc_common.compile(
name = ctx.label.name,
Expand All @@ -191,6 +190,7 @@ def _cc_emboss_aspect_impl(target, ctx):
cc_toolchain = cc_toolchain,
public_hdrs = headers,
private_hdrs = transitive_headers.to_list(),
compilation_contexts = [runtime_cc_info.compilation_context],
)
return [
CcInfo(compilation_context = cc_compilation_context),
Expand Down

0 comments on commit 2014655

Please sign in to comment.