about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2023-11-09 23:04:51 +0300
committeronur-ozkan <work@onurozkan.dev>2023-11-09 23:04:51 +0300
commitfdb72795d1e4f92fd05a86e62fe5819190a1f5a8 (patch)
tree8629ba8b319542953051e033cc260155c6cbebc6 /src/bootstrap
parentd8dbf7ca0ee9c6da0fd039b1eb8cf7c7cb840f43 (diff)
enable unstable feature on `x clean [PATH]`
Since https://github.com/rust-lang/rust/pull/111076 enables
unstable cargo feature (`public-dependency`), we need to ensure
that unstable features are enabled before reading libstd Cargo.toml.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/clean.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/clean.rs b/src/bootstrap/src/core/build_steps/clean.rs
index 679770ce0ec..3a28ab52ff4 100644
--- a/src/bootstrap/src/core/build_steps/clean.rs
+++ b/src/bootstrap/src/core/build_steps/clean.rs
@@ -68,6 +68,12 @@ macro_rules! clean_crate_tree {
                 let compiler = self.compiler;
                 let target = compiler.host;
                 let mut cargo = builder.bare_cargo(compiler, $mode, target, "clean");
+
+                // Since https://github.com/rust-lang/rust/pull/111076 enables
+                // unstable cargo feature (`public-dependency`), we need to ensure
+                // that unstable features are enabled before reading libstd Cargo.toml.
+                cargo.env("RUSTC_BOOTSTRAP", "1");
+
                 for krate in &*self.crates {
                     cargo.arg("-p");
                     cargo.arg(krate);