From 09385f9201ed5bf93cdfe034f44cf1444cd41d45 Mon Sep 17 00:00:00 2001 From: Osama Abdelkader Date: Fri, 7 Nov 2025 16:30:25 +0200 Subject: [PATCH] use bare_rustc to keep host toolchain Signed-off-by: Osama Abdelkader --- tests/run-make/rustdoc-test-builder/rmake.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/run-make/rustdoc-test-builder/rmake.rs b/tests/run-make/rustdoc-test-builder/rmake.rs index 75f1c16de0c3..cd537571cbd9 100644 --- a/tests/run-make/rustdoc-test-builder/rmake.rs +++ b/tests/run-make/rustdoc-test-builder/rmake.rs @@ -5,7 +5,7 @@ //@ needs-target-std -use run_make_support::{path, rfs, rustc, rustc_path, rustdoc}; +use run_make_support::{bare_rustc, path, rfs, rustc_path, rustdoc}; fn main() { // Test 1: Verify that a non-executable test-builder fails gracefully @@ -24,9 +24,10 @@ fn main() { output.assert_not_ice(); // Test 2: Verify that a valid test-builder is invoked with correct arguments - // Build a custom test-builder that logs its arguments and forwards to rustc + // Build a custom test-builder that logs its arguments and forwards to rustc. + // Use `bare_rustc` so we compile for the host architecture even in cross builds. let builder_bin = path("builder-bin"); - rustc().input("builder.rs").output(&builder_bin).run(); + bare_rustc().input("builder.rs").output(&builder_bin).run(); let log_path = path("builder.log"); let _ = std::fs::remove_file(&log_path);