Migrate Automatic Exec Groups by adding a toolchain parameter to the affected actions

This is a step forward for the full migration of Automatic Exec Groups (AEGs). This change will be effective once AEGs are enabled.

In this CL I've added a toolchain_type to `toolchain` attribute of ctx.actions.{run, run_shell} since the Execution platform is selected on a toolchain type level, not on a rule level like before AEGs.

PiperOrigin-RevId: 561043901
pull/13709/head
Nevena Kotlaja 1 year ago committed by Copybara-Service
parent 1a4915e345
commit 2b61ee2d79
  1. 4
      rust/aspects.bzl

@ -145,7 +145,7 @@ def _compile_rust(ctx, attr, src, extra_srcs, deps):
Returns:
A DepVariantInfo provider.
"""
toolchain = ctx.toolchains["@rules_rust//rust:toolchain"]
toolchain = ctx.toolchains["@rules_rust//rust:toolchain_type"]
output_hash = repr(hash(src.path))
# TODO(b/270124215): Use the import! macro once available
@ -326,7 +326,7 @@ def _make_proto_library_aspect(is_upb):
fragments = ["cpp"],
host_fragments = ["cpp"],
toolchains = [
str(Label("@rules_rust//rust:toolchain")),
"@rules_rust//rust:toolchain_type",
"@bazel_tools//tools/cpp:toolchain_type",
],
incompatible_use_toolchain_transition = True,

Loading…
Cancel
Save