Skip to content

Conversation

petrochenkov
Copy link
Contributor

... 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.

@rust-highfive
Copy link
Contributor

r? @Mark-Simulacrum

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 22, 2020
@@ -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
Copy link
Contributor Author

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()
Copy link
Contributor Author

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.

@Mark-Simulacrum
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 22, 2020

📌 Commit 7be36a8 has been approved by Mark-Simulacrum

@bors
Copy link
Collaborator

bors commented Jul 22, 2020

🌲 The tree is currently closed for pull requests below priority 5, this pull request will be tested once the tree is reopened

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 22, 2020
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 22, 2020
…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.
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 22, 2020
…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.
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 22, 2020
…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.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 23, 2020
…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
@bors bors merged commit b32383c into rust-lang:master Jul 23, 2020
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
@petrochenkov petrochenkov deleted the noenvrerun branch February 22, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants