Skip to content

Commit

Permalink
Disable RUSTC_BOOTSTRAP in build.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Aug 31, 2020
1 parent d6b5b53 commit 0b70ab0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cargo/core/compiler/custom_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,13 @@ impl BuildOutput {
let mut iter = value.splitn(2, '=');
let name = iter.next();
let val = iter.next();
if name.unwrap_or("").eq_ignore_ascii_case("RUSTC_BOOTSTRAP") {
if crate::core::features::nightly_features_allowed() {
log::warn!("RUSTC_BOOTSTRAP is not supported in build script overrides");
} else {
anyhow::bail!("RUSTC_BOOTSTRAP is not supported in build script overrides");
}
}
match (name, val) {
(Some(n), Some(v)) => Ok((n.to_owned(), v.to_owned())),
_ => anyhow::bail!("Variable rustc-env has no value in {}: {}", whence, value),
Expand Down

0 comments on commit 0b70ab0

Please sign in to comment.