Skip to content

Add ToolTarget to bootstrap - #143641

Merged
bors merged 12 commits into
rust-lang:masterfrom
Kobzol:tool-target
Jul 19, 2025
Merged

Add ToolTarget to bootstrap#143641
bors merged 12 commits into
rust-lang:masterfrom
Kobzol:tool-target

Conversation

@Kobzol

@KobzolKobzol commented Jul 8, 2025

Copy link
Copy Markdown
Member

Oh, you thought I'm done with refactoring bootstrap tools? Na-ah, think again! After the failure of #143581, ToolTarget is back with a vengeance. This time, I implemented the test changes and tool cleanups without forcing these tools to be built with the stage0 compiler.

There are still some small wins though, LlvmBitcodeLinker now starts at stage 1, and not stage 2. Cargo should also be ported to this new mode, but I'm leaving that for a follow-up PR.

Hopefully X-th time's the charm 🤞

r? @jieyouxu

@rustbotrustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 8, 2025
@Kobzol
Kobzol marked this pull request as ready for review July 9, 2025 09:46
@rustbotrustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 9, 2025
@Kobzol

Copy link
Copy Markdown
MemberAuthor

#142357 was merged, so undrafting.

@jieyouxujieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I need to sit on this scheme a bit, I still find it a bit confusing.

(I was reviewing this commit-by-commit, but now I realize I should've looked at the overall diff)

Comment threadsrc/bootstrap/src/core/build_steps/tool.rs Outdated
Comment threadsrc/bootstrap/src/core/build_steps/tool.rs Outdated
Comment threadsrc/bootstrap/src/core/build_steps/tool.rs Outdated
Comment threadsrc/bootstrap/src/core/build_steps/tool.rs Outdated
Comment threadsrc/bootstrap/src/core/build_steps/tool.rs
Comment threadsrc/bootstrap/src/core/build_steps/tool.rs Outdated
Comment threadsrc/bootstrap/src/core/build_steps/tool.rs Outdated
Comment threadsrc/bootstrap/src/core/build_steps/tool.rs Outdated
@rust-log-analyzer

This comment has been minimized.

@jieyouxujieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks. I'm on-board with the overall change, just some small nits and a double-check.

Comment threadsrc/bootstrap/src/core/build_steps/tool.rs
Comment threadsrc/bootstrap/src/core/build_steps/tool.rs Outdated
Comment threadsrc/bootstrap/src/core/build_steps/tool.rs
Comment threadsrc/bootstrap/src/core/build_steps/tool.rs
@jieyouxu

Copy link
Copy Markdown
Member

@rustbot author

@rustbotrustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 15, 2025
@Kobzol

Copy link
Copy Markdown
MemberAuthor

Clarified comments.

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 15, 2025
@jieyouxu

Copy link
Copy Markdown
Member

Thanks
@bors r+ rollup=never

@borsbors 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 16, 2025
bors added a commit that referenced this pull request Jul 19, 2025
Add `ToolTarget` to bootstrap
Oh, you thought I'm done with refactoring bootstrap tools? Na-ah, think again! After the failure of #143581, `ToolTarget` is back with a vengeance. This time, I implemented the test changes and tool cleanups without forcing these tools to be built with the stage0 compiler.
There are still some small wins though, `LlvmBitcodeLinker` now starts at stage 1, and not stage 2. Cargo should also be ported to this new mode, but I'm leaving that for a follow-up PR.
Hopefully X-th time's the charm 🤞
r? `@jieyouxu`
@bors

bors commented Jul 19, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 4f1b3e3 with merge 826842b...

@rust-log-analyzer

This comment has been minimized.

@bors

bors commented Jul 19, 2025

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@borsbors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 19, 2025
@Kobzol

Copy link
Copy Markdown
MemberAuthor

@bors2 try jobs=dist-aarch64-windows-gnullvm

@rust-bors

rust-borsBot commented Jul 19, 2025

Copy link
Copy Markdown
Contributor

⌛ Trying commit f16016a with merge a0e3c55

To cancel the try build, run the command @bors2 try cancel.

rust-borsBot added a commit that referenced this pull request Jul 19, 2025
Add `ToolTarget` to bootstrap
Oh, you thought I'm done with refactoring bootstrap tools? Na-ah, think again! After the failure of #143581, `ToolTarget` is back with a vengeance. This time, I implemented the test changes and tool cleanups without forcing these tools to be built with the stage0 compiler.
There are still some small wins though, `LlvmBitcodeLinker` now starts at stage 1, and not stage 2. Cargo should also be ported to this new mode, but I'm leaving that for a follow-up PR.
Hopefully X-th time's the charm 🤞
r? `@jieyouxu`
try-job: dist-aarch64-windows-gnullvm
@rust-bors

rust-borsBot commented Jul 19, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a0e3c55 (a0e3c5564fd0a9dd131941fbc58387ba38233c7f, parent: 1079c5edb2bd837e5c4cf8c7db2892db359a3862)

@Kobzol

Copy link
Copy Markdown
MemberAuthor

I switched the dist LLVM bitcode linker to also use a build compiler instead of a target compiler, because the existing dist code was using that, and it would be hard to change right now.

@rustbot ready

@jieyouxujieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@jieyouxu

Copy link
Copy Markdown
Member

@bors r+ rollup=never

@bors

bors commented Jul 19, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit f16016a has been approved by jieyouxu

It is now in the queue for this repository.

@borsbors 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 19, 2025
@bors

bors commented Jul 19, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f16016a with merge f63685d...

@bors

bors commented Jul 19, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing f63685d to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Jul 19, 2025
@bors
bors merged commit f63685d into rust-lang:masterJul 19, 2025
@rustbotrustbot added this to the 1.90.0 milestone Jul 19, 2025
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 12865ff (parent) -> f63685d (this PR)

Test differences

Show 3 test diffs

3 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard f63685ddf3d3c92a61158cd55d44bde17c2b024f --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 6423.5s -> 9416.4s (46.6%)
  2. dist-x86_64-apple: 7864.0s -> 10215.2s (29.9%)
  3. pr-check-2: 2608.3s -> 2161.1s (-17.1%)
  4. aarch64-gnu-debug: 4432.2s -> 3783.9s (-14.6%)
  5. pr-check-1: 1697.5s -> 1489.5s (-12.3%)
  6. i686-gnu-1: 8081.2s -> 7152.8s (-11.5%)
  7. dist-powerpc64le-linux-musl: 5002.0s -> 5553.3s (11.0%)
  8. x86_64-gnu-tools: 3777.0s -> 3368.2s (-10.8%)
  9. x86_64-rust-for-linux: 2837.2s -> 2531.0s (-10.8%)
  10. dist-aarch64-windows-gnullvm: 4391.7s -> 4822.6s (9.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@Kobzol
Kobzol deleted the tool-target branch July 19, 2025 17:23
@borsbors mentioned this pull request Jul 19, 2025
4 tasks
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (f63685d): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.1%[-0.1%, -0.1%]1
All ❌✅ (primary)--0

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 465.616s -> 465.551s (-0.01%)
Artifact size: 374.55 MiB -> 374.61 MiB (0.02%)

Muscraft pushed a commit to Muscraft/rust that referenced this pull request Jul 21, 2025
Add `ToolTarget` to bootstrap
Oh, you thought I'm done with refactoring bootstrap tools? Na-ah, think again! After the failure of rust-lang#143581, `ToolTarget` is back with a vengeance. This time, I implemented the test changes and tool cleanups without forcing these tools to be built with the stage0 compiler.
There are still some small wins though, `LlvmBitcodeLinker` now starts at stage 1, and not stage 2. Cargo should also be ported to this new mode, but I'm leaving that for a follow-up PR.
Hopefully X-th time's the charm 🤞
r? `@jieyouxu`
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuiteArea: The testsuite used to check the correctness of rustcmerged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant 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.

7 participants

@Kobzol@rust-log-analyzer@jieyouxu@bors@rust-timer@alexcrichton@rustbot