]> git.proxmox.com Git - cargo.git/commitdiff
Auto merge of #9181 - jyn514:computer-says-no, r=ehuss
authorbors <bors@rust-lang.org>
Wed, 3 Mar 2021 03:19:33 +0000 (03:19 +0000)
committerbors <bors@rust-lang.org>
Wed, 3 Mar 2021 03:19:33 +0000 (03:19 +0000)
Forbid setting `RUSTC_BOOTSTRAP` from a build script on stable

Instead, recommend `RUSTC_BOOTSTRAP=crate_name`. If cargo is using a nightly toolchain, or if RUSTC_BOOTSTRAP was set in *cargo*'s build environment, the error is downgraded to a warning, since the variable won't affect the build.

This is mostly the same as suggested in https://github.com/rust-lang/cargo/issues/7088#issuecomment-713867773, except that `RUSTC_BOOTSTRAP=` values other than 1 are treated the same as `RUSTC_BOOTSTRAP=1`. My reasoning was that https://github.com/rust-lang/rust/pull/77802 is now on 1.50 stable, so some crates may have started using it, and I would still prefer not to give hard errors when there's no workaround.

Closes https://github.com/rust-lang/cargo/issues/7088.

r? `@joshtriplett`

1  2 
src/bin/cargo/main.rs
src/cargo/util/config/mod.rs
tests/testsuite/config.rs

Simple merge
Simple merge
Simple merge