-
Notifications
You must be signed in to change notification settings - Fork 13k
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
build: Remove unnecessary cargo:rerun-if-env-changed
annotations
#74643
Conversation
Add a FIXME to build scripts in profiler_builtins
(rust_highfive has picked a reviewer for you, use r? to override) |
@@ -28,6 +30,14 @@ macro_rules! t { | |||
}; | |||
} | |||
|
|||
/// Reads an environment variable and adds it to dependencies. | |||
/// Supposed to be used for all variables except those set for build scripts by cargo | |||
/// https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-env-changed says this.
Apparently, if any of the "build script input" env vars changes, then cargo will rerun the script automatically regardless of any other rerun-if
directives?
@@ -548,7 +548,7 @@ impl Session { | |||
self.opts.debugging_opts.asm_comments | |||
} | |||
pub fn verify_llvm_ir(&self) -> bool { | |||
self.opts.debugging_opts.verify_llvm_ir || cfg!(always_verify_llvm_ir) | |||
self.opts.debugging_opts.verify_llvm_ir || option_env!("RUSTC_VERIFY_LLVM_IR").is_some() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cfg
was set in librustc_middle/build.rs
.
Looks like nobody noticed that it stopped working.
Thanks! @bors r+ |
📌 Commit 7be36a8 has been approved by |
🌲 The tree is currently closed for pull requests below priority 5, this pull request will be tested once the tree is reopened |
…ulacrum build: Remove unnecessary `cargo:rerun-if-env-changed` annotations ... and a couple of related cleanups. rustc and cargo now track the majority of env var dependencies automatically (rust-lang/cargo#8421), so the annotations are no longer necessary.
…ulacrum build: Remove unnecessary `cargo:rerun-if-env-changed` annotations ... and a couple of related cleanups. rustc and cargo now track the majority of env var dependencies automatically (rust-lang/cargo#8421), so the annotations are no longer necessary.
…ulacrum build: Remove unnecessary `cargo:rerun-if-env-changed` annotations ... and a couple of related cleanups. rustc and cargo now track the majority of env var dependencies automatically (rust-lang/cargo#8421), so the annotations are no longer necessary.
…arth Rollup of 9 pull requests Successful merges: - rust-lang#73783 (Detect when `'static` obligation might come from an `impl`) - rust-lang#73868 (Advertise correct stable version for const control flow) - rust-lang#74460 (rustdoc: Always warn when linking from public to private items) - rust-lang#74538 (Guard against non-monomorphized type_id intrinsic call) - rust-lang#74541 (Add the aarch64-apple-darwin target ) - rust-lang#74600 (Enable perf try builder) - rust-lang#74618 (Do not ICE on assoc type with bad placeholder) - rust-lang#74631 (rustc_target: Add a target spec option for disabling `--eh-frame-hdr`) - rust-lang#74643 (build: Remove unnecessary `cargo:rerun-if-env-changed` annotations) Failed merges: r? @ghost
... and a couple of related cleanups.
rustc and cargo now track the majority of env var dependencies automatically (rust-lang/cargo#8421), so the annotations are no longer necessary.