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
When the same tool is listed twice for different actions in a cc_tool_map, an error occurs:
# ERROR: /private/var/tmp/_bazel_amontanez/e724b21efc8bc19866072fbc72ee5907/external/_main~_repo_rules~llvm_toolchain/BUILD:60:12: Label '@@_main~_repo_rules~llvm_toolchain//:clang' is duplicated in the 'tools' attribute of rule 'default_tools'
Workaround
To work around this limitation, create an alias pointing to the same tool as an intermediate:
Because Bazel lacks a label_keyed_label_dict, cc_tool_map is implemented by unrolling the passed dictionary into two 1:1 label lists. Bazel emits an error when the same label is listed twice in a label_list, which is what is seen above. For cc_tool_map.tool, it's an error for the same dictionary key to be listed twice, but different keys may point to the same tool. Until Bazel supports a better mechanism for implementing cc_tool_map, please use the workaround above.
The text was updated successfully, but these errors were encountered:
When the same tool is listed twice for different actions in a
cc_tool_map
, an error occurs:Workaround
To work around this limitation, create an alias pointing to the same tool as an intermediate:
Root cause
Because Bazel lacks a
label_keyed_label_dict
,cc_tool_map
is implemented by unrolling the passed dictionary into two 1:1 label lists. Bazel emits an error when the same label is listed twice in alabel_list
, which is what is seen above. Forcc_tool_map.tool
, it's an error for the same dictionary key to be listed twice, but different keys may point to the same tool. Until Bazel supports a better mechanism for implementingcc_tool_map
, please use the workaround above.The text was updated successfully, but these errors were encountered: