-
Notifications
You must be signed in to change notification settings - Fork 346
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
Miri fails to run in presence of RUSTC
environment variable
#2238
Comments
Is it even meaningful to set RUSTC when using Miri? What would you expect that to do? |
Personally I'd expect miri to work the same whether it's set or not, though the actual value probably isn't useful to miri itself. I could raise this as an issue with the jetbrains plugin, but I also feel that having If you don't agree, I'll raise the issue with them instead, and see if they can special-case |
We could make (I do not have a clear idea for the use-cases where one would even set that env var.) |
I think that solution would work fine, a warning then ignoring it. I'm not sure what else miri would actually do with the value. Outside of miri, jetbrains apparently sets it because some users use a self-contained installation of Rust, so |
Something else is happening here -- Miri also runs in rustc bootstrap via Could you debug a bit more what exactly is going on in your case? In particular, your explanation with that |
This |
Ah, I can reproduce this with
Looks like cargo is acting really strangely when both RUSTC and RUSTC_WRAPPER are set? |
Looks like you found my reproduction case on your own, I was running |
Currently, if the
RUSTC
environment variable is set, miri errors out with 'failed to runrustc
to learn about target-specific information'. This appears to be because, incargo-miri
, the arg 'rustc' is being checked for exactly, but withRUSTC
set, it may actually be set to any binary.miri/cargo-miri/bin.rs
Line 1112 in fa4e77c
I found this out due to the Jetbrains rust plugin failing to run miri, as it unconditionally sets the
RUSTC
environment variable. I'm not sure the best solution. Looking for a path ending inrustc
would make an okay patch, but to truly fix the issue, there would need to be a way to distinguish any particular path from being arustc
executable vs a JSON file (forphase_runner
). A possible way to do that is to just attempt to execute the provided path?The text was updated successfully, but these errors were encountered: