X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fbootstrap%2Fbuilder.rs;h=761bd66b5057bb931ee1b0ac9d131a8da2855cb8;hb=e5cf3cb97d228f7c5ac691ebf3f754bec5a92852;hp=894d74fb269a1bab7cc3f1244c9aa9b4504963d1;hpb=78c709ca9b3a9f9e6f6276ff014d9ab3f9c675a0;p=rust.git diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 894d74fb269..761bd66b505 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1226,6 +1226,14 @@ pub fn cargo( // 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