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

Rerun bootstrap's build script when RUSTC changes #93723

Merged
merged 1 commit into from
Feb 7, 2022
Merged
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
2 changes: 2 additions & 0 deletions src/bootstrap/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use std::path::PathBuf;

fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-env-changed=RUSTC");
println!("cargo:rerun-if-env-changed=PATH");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PATH seems correct, but I am surprised that RUSTC is needed: cargo docs claim that those variables set by Cargo are already taken care of by Cargo: "...it is not necessary to use this for environment variables like TARGET that Cargo sets."

Maybe RUSTC is missing there? It would be great if you could file an issue upstream, since presumably that's the cause?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if you could file an issue upstream, since presumably that's the cause?

ok, but I suspect it will be a while before it's fixed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, happy to r+ this before then, just wanted something tracking things. I don't think the fix is that important.

println!("cargo:rustc-env=BUILD_TRIPLE={}", env::var("HOST").unwrap());

// This may not be a canonicalized path.
Expand Down