diff --git a/patches/rules_rs_windows_gnullvm_exec.patch b/patches/rules_rs_windows_gnullvm_exec.patch index 80c35afd6a..c2076928a3 100644 --- a/patches/rules_rs_windows_gnullvm_exec.patch +++ b/patches/rules_rs_windows_gnullvm_exec.patch @@ -1,5 +1,6 @@ # What: teach `rules_rs` that `windows-gnullvm` is a distinct Windows exec ABI. -# Scope: platform/toolchain naming and constraints only; no Cargo target changes. +# Scope: platform/toolchain naming, constraints, and host-tool selection; no +# Cargo target changes. diff --git a/rs/experimental/miri/private/declare_toolchains.bzl b/rs/experimental/miri/private/declare_toolchains.bzl index e0c4f8b..cec29ec 100644 @@ -209,7 +210,7 @@ index 554dd26..f79b73f 100644 _DEFAULT_RUSTC_VERSION = "1.92.0" _DEFAULT_EDITION = "2021" -@@ -302,7 +302,7 @@ def _toolchains_impl(mctx): +@@ -302,20 +302,25 @@ def _toolchains_impl(mctx): for triple in SUPPORTED_EXEC_TRIPLES: exec_triple = _parse_triple(triple) @@ -218,6 +219,25 @@ index 554dd26..f79b73f 100644 rustc_name = "rustc_{}_{}".format(triple_suffix, version_key) rustc_repository( + name = rustc_name, + triple = triple, + version = base_version, + iso_date = iso_date, + sha256 = _sha_for("rustc", base_version, iso_date, exec_triple), + ) + + if version in rust_versions: + cargo_name = "cargo_{}_{}".format(triple_suffix, version_key) +- if exec_triple.arch == host_arch and exec_triple.system == host_os: ++ # Keep extension-time host tools on the native Windows ABI. ++ if ( ++ exec_triple.arch == host_arch and ++ exec_triple.system == host_os and ++ (exec_triple.system != "windows" or exec_triple.abi == "msvc") ++ ): + host_cargo_repos[version] = cargo_name + host_rustc_repos[version] = rustc_name + @@ -363,7 +363,7 @@ def _toolchains_impl(mctx): for triple in SUPPORTED_EXEC_TRIPLES: diff --git a/tools/argument-comment-lint/lint_aspect.bzl b/tools/argument-comment-lint/lint_aspect.bzl index b3de768af1..c20a79caa2 100644 --- a/tools/argument-comment-lint/lint_aspect.bzl +++ b/tools/argument-comment-lint/lint_aspect.bzl @@ -109,7 +109,7 @@ def _rust_argument_comment_lint_aspect_impl(target, ctx): attr = ctx.rule.attr, file = ctx.file, toolchain = toolchain, - tool_path = ctx.executable._driver.path, + tool_file = ctx.executable._driver, cc_toolchain = cc_toolchain, feature_configuration = feature_configuration, crate_info = crate_info, @@ -142,7 +142,7 @@ def _rust_argument_comment_lint_aspect_impl(target, ctx): ) ctx.actions.run( - executable = ctx.executable._process_wrapper, + executable = toolchain.process_wrapper, inputs = action_inputs, outputs = [success_marker], env = env,