Skip to content

resolve target-libdir directly from rustc #141729

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 30, 2025
Merged

Conversation

onur-ozkan
Copy link
Member

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

Leaving stage0 target-libdir resolution to rustc. This should also fix the issue with hard-coding $sysroot/lib which fails on systems that use $sysroot/lib64 or $sysroot/lib32.

Haven't tested, but should fix #141722

@rustbot
Copy link
Collaborator

rustbot commented May 29, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
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 May 29, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks, r=me if reporter confirms it fixes the problem for them

@lucabonnix
Copy link

This patch solves #141722

Many thanks!

@jieyouxu
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 29, 2025

📌 Commit 5a7e065 has been approved by jieyouxu

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 29, 2025
Leaving stage0 target-libdir resolution to rustc. This should also fix the issue with
hard-coding `$sysroot/lib` which fails on systems that use `$sysroot/lib64` or `$sysroot/lib32`.

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

I forgot to trim() the output.

@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 29, 2025
@onur-ozkan
Copy link
Member Author

@bors r=jieyouxu

@bors
Copy link
Collaborator

bors commented May 29, 2025

📌 Commit 0d9f25b has been approved by jieyouxu

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 29, 2025
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 added a commit that referenced this pull request May 29, 2025
Rollup of 11 pull requests

Successful merges:

 - #137574 (Make `std/src/num` mirror `core/src/num`)
 - #141384 (Enable review queue tracking)
 - #141448 (A variety of improvements to the codegen backends)
 - #141636 (avoid some usages of `&mut P<T>` in AST visitors)
 - #141676 (float: Disable `total_cmp` sNaN tests for `f16`)
 - #141705 (Add eslint as part of `tidy` run)
 - #141715 (Add `loongarch64` with `d` feature to `f32::midpoint` fast path)
 - #141723 (Provide secrets to try builds with new bors)
 - #141728 (Fix false documentation of FnCtxt::diverges)
 - #141729 (resolve target-libdir directly from rustc)
 - #141732 (creader: Remove extraenous String::clone)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request May 29, 2025
Rollup of 11 pull requests

Successful merges:

 - #137574 (Make `std/src/num` mirror `core/src/num`)
 - #141384 (Enable review queue tracking)
 - #141448 (A variety of improvements to the codegen backends)
 - #141636 (avoid some usages of `&mut P<T>` in AST visitors)
 - #141676 (float: Disable `total_cmp` sNaN tests for `f16`)
 - #141705 (Add eslint as part of `tidy` run)
 - #141715 (Add `loongarch64` with `d` feature to `f32::midpoint` fast path)
 - #141723 (Provide secrets to try builds with new bors)
 - #141728 (Fix false documentation of FnCtxt::diverges)
 - #141729 (resolve target-libdir directly from rustc)
 - #141732 (creader: Remove extraenous String::clone)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit aaa9159 into rust-lang:master May 30, 2025
9 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 #141729 - onur-ozkan:fix-141722, r=jieyouxu

resolve target-libdir directly from rustc

Leaving stage0 target-libdir resolution to rustc. This should also fix the issue with hard-coding `$sysroot/lib` which fails on systems that use `$sysroot/lib64` or `$sysroot/lib32`.

Haven't tested, but should fix #141722
@onur-ozkan onur-ozkan deleted the fix-141722 branch May 30, 2025 03:46
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
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 30, 2025
…rom-rustc, r=Kobzol

resolve stage0 sysroot from rustc

Similar to rust-lang#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
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
@jyn514
Copy link
Member

jyn514 commented Jun 2, 2025

@rustbot label beta-nominated

@rustbot rustbot added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 2, 2025
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jun 3, 2025
…llaumeGomez

Rollup of 11 pull requests

Successful merges:

 - rust-lang#137574 (Make `std/src/num` mirror `core/src/num`)
 - rust-lang#141384 (Enable review queue tracking)
 - rust-lang#141448 (A variety of improvements to the codegen backends)
 - rust-lang#141636 (avoid some usages of `&mut P<T>` in AST visitors)
 - rust-lang#141676 (float: Disable `total_cmp` sNaN tests for `f16`)
 - rust-lang#141705 (Add eslint as part of `tidy` run)
 - rust-lang#141715 (Add `loongarch64` with `d` feature to `f32::midpoint` fast path)
 - rust-lang#141723 (Provide secrets to try builds with new bors)
 - rust-lang#141728 (Fix false documentation of FnCtxt::diverges)
 - rust-lang#141729 (resolve target-libdir directly from rustc)
 - rust-lang#141732 (creader: Remove extraenous String::clone)

r? `@ghost`
`@rustbot` modify labels: rollup
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
beta-nominated Nominated for backporting to the compiler in the beta channel. 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.

Cannot bootstrap rust with system compiler and customized libdir from 1.85 (stage0-sysroot)
6 participants