-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
improved fn get_or_default_sysroot
#103581
Conversation
Some changes occurred in src/tools/clippy cc @rust-lang/clippy The Miri subtree was changed cc @rust-lang/miri |
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon. Please see the contribution instructions for more information. |
r? @RalfJung |
src/tools/miri/src/bin/miri.rs
Outdated
} | ||
|
||
args.push(sysroot_flag.to_owned()); | ||
args.push(default_sysroot); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still using the --sysroot
arg-passing hack to set the sysroot, so I don't see how that's better than the status quo.
All this seems to do is extract some common code from Miri and clippy, but we could have that more easily by moving that code to a helper crate. The actual problem of rustc hard-coding the default sysroot does not get resolved by this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still using the --sysroot arg-passing hack to set the sysroot, so I don't see how that's better than the status quo.
I suppose I misunderstand the goal here then. I guess all sysroot calculation/value passing logic has to be excluded from miri and it should still keep working as before. If so, I will work on that.
fn get_or_default_sysroot
fn get_or_default_sysroot
☔ The latest upstream changes (presumably #103571) made this pull request unmergeable. Please resolve the merge conflicts. |
fn get_or_default_sysroot
fn get_or_default_sysroot
The Miri change looks great. :) I just hope it will work in all the same cases as before, which are not all covered by our CI... I don't know all that code in rustc_session so I can't comment on it. |
r? @jyn514 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me :)
@RalfJung I know we don't run clippy tests in CI - do we run miri tests? Would be nice to see whether this works at all before a full rollup.
@ozkanonur can you run x test src/tools/clippy
in the meantime and see if that passes? It will take a long time to compile unfortunately.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Amazing, thanks! Can you please squash the commits? r=me with that done. |
The 'tools' builder (the third PR builder) tests both clippy and miri. But the things touched by this PR are most relevant for out-of-tree builds so it is unclear whether CI is even very informative. I will locally test Miri building. |
Miri is looking good :) |
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
8d622d6
to
01459f6
Compare
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
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
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
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