Make ctoolchain_compare.bzl more robust by using ctx.label.name as generated files name.

This ensures that the generated files will be unique in the package and therefore there won't be action conflict.

RELNOTES: None.
PiperOrigin-RevId: 230514342
This commit is contained in:
hlopko 2019-01-23 05:41:57 -08:00 committed by Copybara-Service
parent b8be74cc45
commit a9932b3939
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
"""A test rule that compares two CToolchains in proto format."""
def _impl(ctx):
toolchain_config_proto = ctx.actions.declare_file(ctx.attr.toolchain_identifier + "_toolchain_config.proto")
toolchain_config_proto = ctx.actions.declare_file(ctx.label.name + "_toolchain_config.proto")
ctx.actions.write(
toolchain_config_proto,
ctx.attr.toolchain_config[CcToolchainConfigInfo].proto,