On Tue, Nov 12, 2024 at 7:45 PM Miguel Ojeda <ojeda@xxxxxxxxxx> wrote: > > - Removed "additional" from the documentation and commit message, > since this actually replaces the other flags, unlike other cases. Some news regarding this: we asked upstream Rust about supporting overriding all flags (including e.g. `--edition`, `--target` and `--sysroot`) and apparently this was already accepted via an MCP (thanks Oli Scherer for the pointer!): https://github.com/rust-lang/compiler-team/issues/731 So, in the future, `rustc` will likely get support for this. Thus it may be best to go with an "additional" approach (rather than "replace"), so that this environment variable works the same way as the rest. We can do that by simply waiting until `rustc` implements it and we upgrade the minimum, or by implementing a workaround on our side meanwhile. For instance, something simple like: $(filter-out --target=%,$(s)) $(lastword $(filter --target=%,$(s))) would be probably enough to cover Android's use case since we use the syntax with `=` elsewhere rather than with a space -- the equal sign plays well with Make's string functions. We can also add other flags if needed. I will send a v4 unless someone thinks it is a bad idea. Cheers, Miguel