From 7ff2016748e50ebf3f8263728b90d1502b7716eb Mon Sep 17 00:00:00 2001 From: Nevena Kotlaja Date: Tue, 29 Aug 2023 15:43:21 +0200 Subject: [PATCH 1/2] Add toolchains --- cargo/private/cargo_build_script.bzl | 1 + rust/private/clippy.bzl | 1 + rust/private/rustc.bzl | 3 +++ 3 files changed, 5 insertions(+) diff --git a/cargo/private/cargo_build_script.bzl b/cargo/private/cargo_build_script.bzl index 005b508e1e..4fee88f1e1 100644 --- a/cargo/private/cargo_build_script.bzl +++ b/cargo/private/cargo_build_script.bzl @@ -255,6 +255,7 @@ def _cargo_build_script_impl(ctx): mnemonic = "CargoBuildScriptRun", progress_message = "Running Cargo build script {}".format(pkg_name), env = env, + toolchain = None, ) return [ diff --git a/rust/private/clippy.bzl b/rust/private/clippy.bzl index 071ca29c20..0f1f35ab82 100644 --- a/rust/private/clippy.bzl +++ b/rust/private/clippy.bzl @@ -178,6 +178,7 @@ See https://github.com/bazelbuild/rules_rust/pull/1264#discussion_r853241339 for tools = [toolchain.clippy_driver], arguments = args.all, mnemonic = "Clippy", + toolchain = "@rules_rust//rust:toolchain_type", ) return [ diff --git a/rust/private/rustc.bzl b/rust/private/rustc.bzl index 01838f8436..4df78c659e 100644 --- a/rust/private/rustc.bzl +++ b/rust/private/rustc.bzl @@ -1269,6 +1269,7 @@ def rustc_compile_action( formatted_version, len(crate_info.srcs.to_list()), ), + toolchain = None, ) if args_metadata: ctx.actions.run( @@ -1284,6 +1285,7 @@ def rustc_compile_action( formatted_version, len(crate_info.srcs.to_list()), ), + toolchain = None, ) else: # Run without process_wrapper @@ -1302,6 +1304,7 @@ def rustc_compile_action( formatted_version, len(crate_info.srcs.to_list()), ), + toolchain = "@rules_rust//rust:toolchain_type", ) if experimental_use_cc_common_link: From 32f3067faff034be06c11a2cd5523edcea367baa Mon Sep 17 00:00:00 2001 From: Nevena Kotlaja Date: Mon, 11 Sep 2023 11:03:20 +0200 Subject: [PATCH 2/2] Update toolchains --- rust/private/rustc.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/private/rustc.bzl b/rust/private/rustc.bzl index 4df78c659e..e24e05a2ef 100644 --- a/rust/private/rustc.bzl +++ b/rust/private/rustc.bzl @@ -1269,7 +1269,7 @@ def rustc_compile_action( formatted_version, len(crate_info.srcs.to_list()), ), - toolchain = None, + toolchain = "@rules_rust//rust:toolchain_type", ) if args_metadata: ctx.actions.run( @@ -1285,7 +1285,7 @@ def rustc_compile_action( formatted_version, len(crate_info.srcs.to_list()), ), - toolchain = None, + toolchain = "@rules_rust//rust:toolchain_type", ) else: # Run without process_wrapper