Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?
Add a way to extract miri flags from --config, env and toml #3875
Changes from all commits
821459d
8273896
8959e9f
d0f39d2
a8b44f3
2734745
f69a651
2920eba
08668c7
3502a94
914bda3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
So you are taking the miri flags and passing them to cargo...? How does that make sense?
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.
Please add a doc comment explaining what this does. (Seems like you have a bunch of that inside the function, but that's now how doc comments work in Rust.)
Why "mini"?
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.
Please add a link to where this behavior is documented for cargo.
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.
Hi Ralf, this is from PR #2451 https://github.com/rust-lang/miri/pull/2451/files#diff-922365a8fd004632c70c2426b2851c89ed2e13229b7e7693550b87f00b100badR552 for the function get_miriflags().
I'll remove this block of comment from this function.
The comment can be made clearer by specifying
flags from cargo config
toflags from .cargo/config.toml
(configuration file instead of --config option) since we run this inget_miriflags_runner
The behavior is from https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides
We check the arguments from --config first, then environment variable, then check the configuration files via
cargo config get
.I couldn't find the evidence for
This matches cargo behavior for RUSTFLAGS.
Should I remove that line?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.
There is https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags. So please add a link to that -- and make sure that MIRIFLAGS behaves the same, except that for now we don't have to support setting
CARGO_ENCODED_MIRIFLAGS
ortarget.<triple>.miriflags
.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 doesn't make sense, "ENCODED" env vars shouldn't use
flagsplit
. They use a different format that doesn't rely on whitespace. See the cargo docs.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.
From https://doc.rust-lang.org/cargo/reference/environment-variables.html
I'll change this soon. Keeping this unresolved. Thank you
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.
What are you trying to do here?
cargo_extra_flags
will never contain any-Zmiri
. Please read the doc comment of the functions you call.