You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think cc_tool(src) should be cfg=target, not cfg=exec.
Explanation: The cc_tool rule does not (itself) execute the tool as a build action (no ctx.actions.run). Presumably there will eventually be some other rule that uses the output from cc_tool as an attribute, and (importantly) also invokes the tool. That rule should consume the tool via an attribute with cfg=exec, so the tool transition can evaluate all the constraints correctly for that rule.
The text was updated successfully, but these errors were encountered:
There were some aspects of the initial design that warranted putting cfg=exec there, but kind of agree with you. We should probably put cfg=exec at the cc_toolchain.tool_map attribute, and remove it from the cc_tool rule.
rules_cc/cc/toolchains/tool.bzl
Line 68 in 8c94e11
I think
cc_tool(src)
should becfg=target
, notcfg=exec
.Explanation: The
cc_tool
rule does not (itself) execute the tool as a build action (no ctx.actions.run). Presumably there will eventually be some other rule that uses the output from cc_tool as an attribute, and (importantly) also invokes the tool. That rule should consume the tool via an attribute with cfg=exec, so the tool transition can evaluate all the constraints correctly for that rule.The text was updated successfully, but these errors were encountered: