Allow building Miri with --features from miri-script#4396
Conversation
RalfJung
left a comment
There was a problem hiding this comment.
Thanks! Overall, I am on board. I left some comments.
I'd prefer if we didn't have to pass this around everywhere, it seems easy to mix up the feature lists. But that seems like a larger refactor... so not for this PR.
6eba306 to
967a531
Compare
There was a problem hiding this comment.
Thanks for the review! I force pushed to remove the unrelated file (I made the commit a few weeks ago and cherry picked it a few times, and that file was committed accidentally at some point, sorry for not noticing). I also pushed a commit to add --features to clippy and to auto_actions and to fix the order of features and flags.
|
I assume this is |
|
This looks great, thanks! Please squash the commits using @rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
Otherwise there was no way to pass e.g. `--features tracing` just to the `cargo` commands issued on the root repository: CARGO_EXTRA_FLAGS applies the flags to the "cargo-miri" crate, too, which does not make sense for crate-specific features. Fix install_to_sysroot doing path concatenation twice. Since the second concatenation was against an absolute path, it didn't do anything. This also makes the interface of install_to_sysroot() similar to that of cargo_cmd(). Implement --features for clippy, also fix not passing features to one of the cargo invocations for test
c7d7514 to
eb56874
Compare
|
@rustbot ready |
I added the
--featuresflag to allCommands for whichcargocan accept--features, i.e. install, build, check, test, run, doc. Those who can't accept--featuresare clippy, fmt, toolchain, rustc pull, rustc push, squash (the last 4 are not even cargo commands). Furthermore, I did not add it to theBenchcommand since that command doesn't take any "--flags" either.This PR is needed because there is no way to pass e.g.
--features tracingjust to thecargocommands issued on the root repository. UnfortunatelyCARGO_EXTRA_FLAGSapplies the flags to the "cargo-miri" crate, too, which does not make sense for crate-specific features.This PR also includes a small commit to make the interface of
install_to_sysrootclearer.Note: this PR is the counterpart to rust-lang/rust#142379, which is for when Miri is built in the rustc repo.