about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2025-03-11 09:43:39 -0700
committerEric Huss <eric@huss.org>2025-03-11 09:43:39 -0700
commit61339997194448cd8b18b422f32ced0126963213 (patch)
tree68bf34ef28bf1e254d0dda6b62970c363474bfe2
parent5d4ff50f49220ebdf894421999ecee3deeaa7938 (diff)
downloadrust-61339997194448cd8b18b422f32ced0126963213.tar.gz
rust-61339997194448cd8b18b422f32ced0126963213.zip
Fix `cargo vendor` not working without `rustc` installed
This fixes an issue where vendoring would fail if `rustc` is not in
PATH. This happens with the update of some workspaces to the 2024
edition which need to run `rustc -Vv` to determine which rust version is
in use.
-rw-r--r--src/bootstrap/src/core/build_steps/vendor.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/vendor.rs b/src/bootstrap/src/core/build_steps/vendor.rs
index 984c70955d7..0caeb328811 100644
--- a/src/bootstrap/src/core/build_steps/vendor.rs
+++ b/src/bootstrap/src/core/build_steps/vendor.rs
@@ -103,6 +103,7 @@ impl Step for Vendor {
         // Will read the libstd Cargo.toml
         // which uses the unstable `public-dependency` feature.
         cmd.env("RUSTC_BOOTSTRAP", "1");
+        cmd.env("RUSTC", &builder.initial_rustc);
 
         cmd.current_dir(self.root_dir).arg(&self.output_dir);