improve filesearch::get_or_default_sysroot#103660
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nagisa (or someone else) soon. Please see the contribution instructions for more information. |
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy The Miri subtree was changed cc @rust-lang/miri |
|
r? @jyn514 @ozkanonur if you remove the last commit ("merge branch master") we can merge this:) |
It was conflict resolving commit. Rollbacked it. |
|
Try using https://rustc-dev-guide.rust-lang.org/git.html#rebasing-and-conflicts to resolve the conflicts. |
|
@bors r+ |
improve `filesearch::get_or_default_sysroot` `fn get_or_default_sysroot` is now improved and used in `miri` and `clippy`, and tests are still passing as they should. So we no longer need to implement custom workarounds/hacks to find sysroot in tools like miri/clippy. Resolves rust-lang#98832 re-opened from rust-lang#103581
improve `filesearch::get_or_default_sysroot` `fn get_or_default_sysroot` is now improved and used in `miri` and `clippy`, and tests are still passing as they should. So we no longer need to implement custom workarounds/hacks to find sysroot in tools like miri/clippy. Resolves rust-lang#98832 re-opened from rust-lang#103581
Signed-off-by: Onur Özkan <work@onurozkan.dev>
A reminder, PR popped-off from the merge queue after windows compatibility fix(I tested it). |
|
Hmm, I don't actually see any changes since the failed rollup? both the force pushes say "no changes to compare" |
Here is the change for win compatibility fix f1b11b39940bda3e37d2c3a588f1baba27e6bb59 and 9e06962018506edc185ddc48eb30cc95dd81aa3f for fixing fmt error. At the end, commits squashed and pushed with |
|
Thanks :) @bors r+ |
improve `filesearch::get_or_default_sysroot` `fn get_or_default_sysroot` is now improved and used in `miri` and `clippy`, and tests are still passing as they should. So we no longer need to implement custom workarounds/hacks to find sysroot in tools like miri/clippy. Resolves rust-lang#98832 re-opened from rust-lang#103581
Rust changed the way the SYSROOT is determined in: rust-lang/rust#103660 Before this change the SYSROOT was determined based on the rustc executable. Now it is determined based on the librustc_driver-*.so file. This pr fixes the detection by copying the library to the derivation as we have done it for the rustc executable.
improve `filesearch::get_or_default_sysroot` `fn get_or_default_sysroot` is now improved and used in `miri` and `clippy`, and tests are still passing as they should. So we no longer need to implement custom workarounds/hacks to find sysroot in tools like miri/clippy. Resolves rust-lang#98832 re-opened from rust-lang#103581
Rollup of 6 pull requests Successful merges: - rust-lang#103621 (Correctly resolve Inherent Associated Types) - rust-lang#103660 (improve `filesearch::get_or_default_sysroot`) - rust-lang#103866 (Remove some return-type diagnostic booleans from `FnCtxt`) - rust-lang#103867 (Remove `has_errors` from `FnCtxt`) - rust-lang#103994 (Specify that `break` cannot be used outside of loop *or* labeled block) - rust-lang#103995 (Small round of typo fixes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Rust changed the way the SYSROOT is determined in: rust-lang/rust#103660 Before this change the SYSROOT was determined based on the rustc executable. Now it is determined based on the librustc_driver-*.so file. This pr fixes the detection by copying the library to the derivation as we have done it for the rustc executable.
… r=ozkanonur compiler/rustc_session: fix sysroot detection logic This pull request fixes the sysroot detection logic on systems where `/usr/lib` contains a multi-arch structure (e.g. installs `rustc_driver` into `/usr/lib/x86_64-linux-gnu` folder). This fixes a regression for various Linux systems introduced in rust-lang#103660. On Debian and Ubuntu systems, the logic in the pull request, as mentioned earlier, will resolve the sysroot to `/usr/lib`, making `rustc --print target-libdir` to return `/usr/lib/lib/rustlib/x86_64-unknown-linux-gnu/lib` (notice the extra `lib` at the beginning). The fix is not very "clean" according to the standard. If you have any suggestions on improving the logic, you are more than welcome to comment below!
rust-lang/rust#103660 makes this unnecessary. Closes #2
- Remove sysroot handling. Since rust-lang/rust#103660 this is detected automatically! - Update to a newer toolchain; in particular `install_ice_hook` has changed its signature. - Remove the wrapper code; it only matters for cargo plugins, but ubrustc only has an equivalent of clippy-driver, not cargo-clippy.
This is no longer needed: simply linking against rustc_driver does the job. See rust-lang/rust#103660.
This is no longer needed: simply linking against rustc_driver does the job. See rust-lang/rust#103660.
This is no longer needed: simply linking against rustc_driver does the job. See rust-lang/rust#103660.
Upstream change: rust-lang/rust#103660 Reference: nix-community/fenix#91
fn get_or_default_sysrootis now improved and used inmiriandclippy, and tests are still passing as they should. So we no longer need to implement custom workarounds/hacks to find sysroot in tools like miri/clippy.Resolves #98832
re-opened from #103581