Open
Description
cargo-miri and the Miri driver do a bunch of processing with the arguments passed to rustc -- that's terrible but currently not really avoidable. However we are entirely ignoring the existence of argument files, which already caused #3404 and could cause further issues in the future. So we should fix that.
- cargo-miri: this is where most of the argument parsing and patching happens
- For things that just scan the arguments, we should recurse into argument files so we can scan them as well.
- When we are patching arguments (like replacing rlib by rmeta in
--extern
or filtering out certain flags), I'm not sure what to do -- either we just say argument files are not supported there, or we pass these arguments directly without files (which risks issues on Windows), or we have to generate our own argument files.
- miri driver: needs to do argument parsing to set a default sysroot. Ideally we can just avoid having to do that. I tied two approaches for that: