rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.17k stars 320 forks source link

Support argfiles in all our argument munching #3412

Open RalfJung opened 3 months ago

RalfJung commented 3 months ago

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 https://github.com/rust-lang/miri/issues/3404 and could cause further issues in the future. So we should fix that.

RalfJung commented 3 months ago

Turns out cargo will use argfiles "on demand": if spawning the process fails because the argument list was too long, it falls back to an argfile. So that could lead to some very strange failures modes for Miri where when the number of dependencies exceeds some limit, suddenly cargo miri stops working on Windows...