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
diff --git a/tools/migration/ctoolchain_compare.bzl b/tools/migration/ctoolchain_compare.bzl
index 8109dc5..3ea94f2 100644
--- a/tools/migration/ctoolchain_compare.bzl
+++ b/tools/migration/ctoolchain_compare.bzl
@@ -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,