-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
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 <[email protected]>
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+ |
Upstream change: rust-lang/rust#103660 Reference: nix-community/fenix#91
This no longer takes the This no longer works to set the
Is this intentional? @ozkanonur @jyn514 (Sorry for reporting this so late. The sync was blocked for so long, partly because I didn't have time to deal with it) |
I think I should have leave it supported(like miri's I can open the fix PR if needed(depending on the answer from Joshua). |
Miri still has this logic for that purpose -- maybe the equivalent in clippy got accidentally deleted in this PR. (A bit surprising that rustc CI would pass then though since it checks clippy?) |
I guess we should also implement a test that checks this case then |
Ah ok, yes this should also be implemented in Clippy. I will do that in the Sync PR on the Clippy side and then sync it back. The CI didn't fail, because in the Rust repo some tests aren't run. One of them is our |
This might be true for clippy but not all subtrees -- for Miri we run pretty much all tests and I do full feature development in the rutsc repo when needed (because rustc changes are required). |
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.
fn get_or_default_sysroot
is now improved and used inmiri
andclippy
, 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