-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Labels
untriagedTeam member has to triage this issue - assign priority, type, and owner (if possible).Team member has to triage this issue - assign priority, type, and owner (if possible).
Description
I want to wrap cc_binary in macros to select a different compiler for multiple binaries. I came up with this which works perfectly with native cc_binary.
def _wrap_impl(name, **kwargs):
cc_binary(
name = name,
**kwargs,
)
_transition_to_clang(
name = name + "_transition",
binary = name,
)
cc_wrap = macro(
inherit_attrs = native.cc_binary,
implementation = _wrap_impl,
)When I change native.cc_binary to cc_binary from rules_cc, I get an error since the latter is exported as a function instead of a rule, contrary to what the cc_binary docstring in rules_cc/cc/cc_binary.bzl states.
Metadata
Metadata
Assignees
Labels
untriagedTeam member has to triage this issue - assign priority, type, and owner (if possible).Team member has to triage this issue - assign priority, type, and owner (if possible).