-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Only depend on CFG_VERSION in rustc_interface #111345
Conversation
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
507b530
to
5caed34
Compare
This comment has been minimized.
This comment has been minimized.
5caed34
to
1fa1f59
Compare
The refactor itself looks good. |
2d084a5
to
02ef8c6
Compare
This comment has been minimized.
This comment has been minimized.
01998bd
to
66eab2c
Compare
all: | ||
$(RUSTC) --emit=metadata --crate-type lib stable.rs | ||
$(RUSTC) --emit=metadata --extern stable=$(TMPDIR)/libstable.rmeta main.rs 2>&1 >/dev/null \ | ||
| $(CGREP) -e "stable since $$(cat $(S)/src/version)(-[a-zA-Z]+)?" |
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.
Very nice ❤️
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.
I think we support custom metadata in the version string via https://github.com/rust-lang/rust/blob/master/config.example.toml#L557, I'm not quite sure where that goes though. Maybe it doesn't affect this.
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.
"it doesn't affect this" is exactly the point of this test - it's ensuring that CFG_RELEASE
only has the version number, unlike CFG_VERSION
which includes the custom metadata.
this avoids having to rebuild the whole compiler on each commit when `omit-git-hash = false`.
66eab2c
to
d5f2b8e
Compare
r? @est31 |
Failed to set assignee to
|
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.
LGTM
@bors r=cjgillot,est31 |
@bors r=cjgillot,est31 |
💡 This pull request was already approved, no need to approve it again.
|
☀️ Test successful - checks-actions |
Finished benchmarking commit (c9dc55d): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 640.647s -> 641.544s (0.14%) |
This avoids having to rebuild the whole compiler on each commit when
omit-git-hash = false
.cc #76720 - this won't fix it, and I'm not suggesting we turn this on by default, but it will make it less painful for people who do have
omit-git-hash
on as a workaround.