When cpu value is not enough to distinguish between two toolchains, we use the compiler value. In that case, the user needs to specify the compiler value for all cc_toolchain_config rules, even for the ones with unique cpu. This cl fixes the allowed values in the compiler attribute to account for the values from unique toolchains.
Issue #5380
RELNOTES: None.
PiperOrigin-RevId: 239396228
This will make sure the copybara export is reversible, which is needed for setting up copybara workflow for importing github PRs.
RELNOTES: None.
PiperOrigin-RevId: 238445502
* # copybara-scrub suffix now works in BUILD and bzl files
* //tools/cpp is rewritten to @bazel_build//tools/cpp **in any filetype**
* //third_party/bazel_rules/rules_cc is rewritten to // **in any filetype**
PiperOrigin-RevId: 233919400
And fix an error where we added previously unseen action_names to the dictionary of familiar ACTION_NAMES, so later when we would encounter them, we would treat them as variables, not as string literals
eg
env_set {
action = "a"
}
would translate to
env_set(
actions = [a],
)
which is, obviously wrong.
Issue #5380
PiperOrigin-RevId: 232817515
If toolchain A and B need feature f, but toolchain C doesn't, the generated declaration statement for feature f would be:
if ctx.attr.cpu == 'A.cpu':
f = feature(...)
elif ctx.attr.cpu == "B.cpu" and ctx.attr.compiler == "B.compiler":
f = feature(...)
else:
fail("Unreachable")
This will break the rule implementation in the case of toolchain C because it will reach the fail("Unreachable") although it doesn't need to declare feature f
This cl fixes that
Issue #5380
PiperOrigin-RevId: 232683639
If an action_config's name doesn't appear in the action_names.bzl, eg action-a.b+c, in it's assignments statement we would declare it as:
action_a.b+c_action = action_config( ...
This cl fixes it to create the action_config variable with the +, - and .
It also adds tests for action_config
Issue #5380
PiperOrigin-RevId: 232681355