Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable RUSTC_BOOTSTRAP in build.rs #8667

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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