Skip to content

resolve stage0 sysroot from rustc #141736

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

Merged
merged 1 commit into from
May 30, 2025

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented May 29, 2025

Similar to #141729, instead of manually navigating directories based on stage0 rustc, use --print sysroot to get the sysroot directly. This also works when using the bootstrap rustc shim.

r? Kobzol

Instead of manually navigating directories based on stage0 rustc, use `--print sysroot`
to get the sysroot directly. This also works when using the bootstrap `rustc` shim.

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

rustbot commented May 29, 2025

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@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 May 29, 2025
@Kobzol
Copy link
Contributor

Kobzol commented May 29, 2025

@bors try

bors added a commit that referenced this pull request May 29, 2025
…r=<try>

resolve stage0 sysroot from rustc

Similar to #141729, instead of manually navigating directories based on stage0 rustc, use `--print sysroot` to get the sysroot directly. This also works when using the bootstrap `rustc` shim.

r? Kobzol
@bors
Copy link
Collaborator

bors commented May 29, 2025

⌛ Trying commit 0565d43 with merge b32a291...

@onur-ozkan
Copy link
Member Author

cherry-picked from the redesign stage 0 std PR; closing this one.

@onur-ozkan onur-ozkan closed this May 29, 2025
@onur-ozkan onur-ozkan reopened this May 30, 2025
@onur-ozkan
Copy link
Member Author

Reopening this as this should fix the recent benchmarking bug introduced in #141729.

cc @matthiaskrgr

@onur-ozkan
Copy link
Member Author

I can rebase #119899 once this is merged anyway.

@Kobzol
Copy link
Contributor

Kobzol commented May 30, 2025

@bors try

bors added a commit that referenced this pull request May 30, 2025
…r=<try>

resolve stage0 sysroot from rustc

Similar to #141729, instead of manually navigating directories based on stage0 rustc, use `--print sysroot` to get the sysroot directly. This also works when using the bootstrap `rustc` shim.

r? Kobzol
@bors
Copy link
Collaborator

bors commented May 30, 2025

⌛ Trying commit 0565d43 with merge 1516c20...

@bors
Copy link
Collaborator

bors commented May 30, 2025

☀️ Try build successful - checks-actions
Build commit: 1516c20 (1516c20e51c6337cef4e6342cbfa61848e6448fa)

@Kobzol
Copy link
Contributor

Kobzol commented May 30, 2025

Locally it looks like it has helped. Let's try on the server.

@rust-timer build 1516c20

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1516c20): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

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

Max RSS (memory usage)

Results (primary 0.5%, secondary 0.7%)

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)
1.3% [1.0%, 1.7%] 2
Regressions ❌
(secondary)
1.3% [0.6%, 3.4%] 7
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
-0.7% [-1.1%, -0.4%] 3
All ❌✅ (primary) 0.5% [-1.1%, 1.7%] 3

Cycles

Results (secondary 1.2%)

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)
2.3% [0.5%, 7.1%] 13
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.0% [-1.9%, -0.4%] 7
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: missing data
Artifact size: 370.26 MiB -> 370.21 MiB (-0.01%)

@Kobzol
Copy link
Contributor

Kobzol commented May 30, 2025

Great, it worked! Let's give it a bit higher priority.

@bors r+ rollup p=1

@bors
Copy link
Collaborator

bors commented May 30, 2025

📌 Commit 0565d43 has been approved by Kobzol

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 May 30, 2025
bors added a commit that referenced this pull request May 30, 2025
Rollup of 5 pull requests

Successful merges:

 - #141703 (Structurally normalize types as needed in `projection_ty_core`)
 - #141719 (Add tls_model for cygwin and enable has_thread_local)
 - #141736 (resolve stage0 sysroot from rustc)
 - #141746 (Rework `#[doc(cfg(..))]` checks as distinct pass in rustdoc)
 - #141749 (Remove RUSTC_RETRY_LINKER_ON_SEGFAULT hack)

r? `@ghost`
`@rustbot` modify labels: rollup
@Kobzol
Copy link
Contributor

Kobzol commented May 30, 2025

This PR is included in #141765, so to avoid a homu race condition w.r.t. the priority, I'll revert it back.

@bors p=0

@bors bors merged commit 611340f into rust-lang:master May 30, 2025
18 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 30, 2025
rust-timer added a commit that referenced this pull request May 30, 2025
Rollup merge of #141736 - onur-ozkan:resolve-stage0-syroot-from-rustc, r=Kobzol

resolve stage0 sysroot from rustc

Similar to #141729, instead of manually navigating directories based on stage0 rustc, use `--print sysroot` to get the sysroot directly. This also works when using the bootstrap `rustc` shim.

r? Kobzol
@onur-ozkan onur-ozkan deleted the resolve-stage0-syroot-from-rustc branch May 30, 2025 18:07
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. 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