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

Set CFG_OMIT_GIT_HASH=1 during builds when omit-git-hash is enabled #117868

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

pietroalbini
Copy link
Member

This environment variable will allow tools like Cargo to disable their own detection when omit-git-hash is set to true.

I created this PR because of rust-lang/cargo#12968. There is not a dependency between the two PRs, they can land in any order. They just won't do anything until both of them are merged into the repo.

@rustbot
Copy link
Collaborator

rustbot commented Nov 13, 2023

r? @Mark-Simulacrum

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 13, 2023
@Mark-Simulacrum
Copy link
Member

@bors r+

We should consider whether this should be a proper Cargo feature at some point (e.g., https://doc.rust-lang.org/nightly/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates having a CARGO_CRATE_GIT_HASH or so), since otherwise I imagine there's some whack-a-mole here in theory.

@bors
Copy link
Contributor

bors commented Nov 18, 2023

📌 Commit cd4adb8 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 Nov 18, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Nov 18, 2023
…-Simulacrum

Set `CFG_OMIT_GIT_HASH=1` during builds when `omit-git-hash` is enabled

This environment variable will allow tools like Cargo to disable their own detection when `omit-git-hash` is set to `true`.

I created this PR because of rust-lang/cargo#12968. There is not a dependency between the two PRs, they can land in any order. They just won't do anything until both of them are merged into the repo.
@bors
Copy link
Contributor

bors commented Nov 19, 2023

⌛ Testing commit cd4adb8 with merge 0d3dfb5...

@bors
Copy link
Contributor

bors commented Nov 19, 2023

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 0d3dfb5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 19, 2023
@bors bors merged commit 0d3dfb5 into rust-lang:master Nov 19, 2023
11 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 19, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0d3dfb5): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.8% [-4.8%, -4.8%] 1
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.8% [0.8%, 0.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [0.8%, 0.8%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 674.495s -> 676.828s (0.35%)
Artifact size: 313.82 MiB -> 313.81 MiB (-0.00%)

@pietroalbini pietroalbini deleted the pa-omit-git-hash branch November 20, 2023 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants