Skip to content

Commit

Permalink
Disable unstable features in bootstrap tools
Browse files Browse the repository at this point in the history
This statically prevents issues like rust-lang#59264,
where tools can only be built with the in-tree compiler and not beta.
  • Loading branch information
jyn514 committed May 22, 2022
1 parent b0ea4e7 commit 751ad4a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,14 @@ impl<'a> Builder<'a> {
// this), as well as #63012 which is the tracking issue for this
// feature on the rustc side.
cargo.arg("-Zbinary-dep-depinfo");
match mode {
Mode::ToolBootstrap => {
// Restrict the allowed features to those passed by rustbuild, so we don't depend on nightly accidentally.
// HACK: because anyhow does feature detection in build.rs, we need to allow the backtrace feature too.
rustflags.arg("-Zallow-features=binary-dep-depinfo,backtrace");
}
Mode::Std | Mode::Rustc | Mode::ToolStd | Mode::Codegen | Mode::ToolRustc => {}
}

cargo.arg("-j").arg(self.jobs().to_string());
// Remove make-related flags to ensure Cargo can correctly set things up
Expand Down

0 comments on commit 751ad4a

Please sign in to comment.