On Wed, Apr 9, 2025 at 11:35 PM Matthew Maurer mmaurer@google.com wrote:
The problem with this change is that some `rustc` flags will only be valid on some platforms. For example, if we check if a
Indeed -- this limitation is acknowledged in the commit message. The priority is fixing the issue, not future features/needs, so I went with this.
In any case, if we need to test a flag that requires the target, it is likely we can do the check based on the Rust version, the architecture, the Rust's LLVM version, etc.
As for `target.json`s, the plan is indeed to get rid of them, since they are permanently unstable. So any features used by the `target.json`s need to be requested to upstream Rust (e.g. flags) so that we can do the same without a custom target specification, so that eventually we can remove all of them (and thus `rustc-option` will work in all cases again).
Thanks for taking a look!
Cheers, Miguel