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

always run configure_linker except for mir-opt tests #120803

Merged
merged 2 commits into from
Feb 11, 2024

Conversation

onur-ozkan
Copy link
Member

configure_linker now runs consistently unless it's for mir-opt tests. Previously != "check" condition was causing dirt in the cargo cache between runs of x anything-but-not-check and x check.

Fixes #120768

cc @saethlin

`configure_linker` now runs consistently unless it's for mir-opt tests.
 Previously `!= "check"` condition was causing dirt in the cargo cache between
 runs of `x anything-but-not-check` and `x check`

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@rustbot
Copy link
Collaborator

rustbot commented Feb 8, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or
reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Feb 8, 2024
Copy link
Member

@saethlin saethlin left a comment

Choose a reason for hiding this comment

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

I've tried this out and it seems to work.

I'd love to see a cleaner signature for Builder::cargo in the future, but I'm happy to see any fix for this so quickly. Thanks!

@onur-ozkan
Copy link
Member Author

I'd love to see a cleaner signature for Builder::cargo in the future

This is definetly on my to-do plans.

@onur-ozkan
Copy link
Member Author

Made some refactoring to how we handle linker configuration in Builder::cargo. I think it looks okay overall, but the downside is that we have to configure the linker manually when needed. Any thoughts? @RalfJung @saethlin

@RalfJung
Copy link
Member

Seems too easy now to just forget calling configure_linker -- it's what you need in most cases, after all.

@onur-ozkan
Copy link
Member Author

the downside is that we have to configure the linker manually when needed. Any thoughts?

We don't do this anymore. Builder::cargo is now private, and we use these new functions instead: https://github.com/onur-ozkan/rust/blob/3c019de0febceeed9432813c8dfd39280b244d5c/src/bootstrap/src/core/builder.rs#L2240-L2264.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@RalfJung
Copy link
Member

The approach makes sense to me, sadly I can't confidently review bootstrap changes.

@rust-lang/bootstrap would be good to land this rather quickly, this is fixing an issue that currently extends the edit-compile-test cycle for some cases from <1s to >1min.

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Feb 10, 2024

📌 Commit ff6d296 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 Feb 10, 2024
@RalfJung
Copy link
Member

This is fixing a rustc development roadblock.
@bors p=1

@bors
Copy link
Contributor

bors commented Feb 11, 2024

⌛ Testing commit ff6d296 with merge 1a648b3...

@bors
Copy link
Contributor

bors commented Feb 11, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 11, 2024
@bors bors merged commit 1a648b3 into rust-lang:master Feb 11, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 11, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1a648b3): 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)
-3.9% [-3.9%, -3.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.9% [-3.9%, -3.9%] 1

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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.4% [-1.7%, -1.0%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.4% [-1.7%, -1.0%] 4

Binary size

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

Bootstrap: 664.94s -> 664.283s (-0.10%)
Artifact size: 308.28 MiB -> 308.29 MiB (0.01%)

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.

"x.py check" dirties the build cache for "x.py build"
7 participants