-
Notifications
You must be signed in to change notification settings - Fork 331
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
Add a way to extract miri flags from --config, env and toml #3875
base: master
Are you sure you want to change the base?
Conversation
hmmm hahha ok maybe i should have retained "-Zmiri" instead of just miri. The latter makes file name and other things gets tangled in |
001faa5
to
3502a94
Compare
after debugging i found out that in phase_cargo_miri if i try to extract MIRIFLAGS (a.k.a choice (3)) from env then some of the program will fail like this
but if i seperate them into so that in phase_cargo_miri I only perform choice (1) and (2) and then in phase_runner the rest then the ui test passes fine. I think I'm missing sth important? |
@rustbot ready |
heheh now i know how to ask for review |
Yeah I've seen the PR. :) Thanks for creating it! It's quite busy in my life currently though, so I can't promise when I will get around to take a look at this. |
@@ -181,6 +181,8 @@ pub fn phase_cargo_miri(mut args: impl Iterator<Item = String>) { | |||
let target_dir = get_target_dir(&metadata); | |||
cmd.arg("--target-dir").arg(target_dir); | |||
|
|||
// eprintln!("Getting miri flags in phase_cargo_miri"); |
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 commented eprintln
might need to be removed.
But I am not the maintainer and this PR might be on a draft state, so this is just a reminder. :)
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.
haha yes I'll remove it on the next iteration :) ty for the review
Fixes #2347.
The main driver is get_miri_flags in
cargo-miri/src/util.rs
, which follow this stratergy:This is called once in phase_cargo_miri, then again in phase_runner.
For --config, I only retains all String that contains "miri", and then join them via " " for env. This is because flagsplit splits based on the space character. Please let me know if this is not the procedure.
In later stage this env is resolved into Vec via flagsplit().
I'm not sure how to write the test to describe this precedence of (1) over (2). Advice would be helpful :)