mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-01 21:45:15 +00:00
codegen_ssa: consolidate tied target checks Fixes #105110. Fixes #105111. `rustc_codegen_llvm` and `rustc_codegen_gcc` duplicated logic for checking if tied target features were partially enabled. This PR consolidates these checks into `rustc_codegen_ssa` in the `codegen_fn_attrs` query, which also is run pre-monomorphisation for each function, which ensures that this check is run for unused functions, as would be expected. Also adds a test confirming that enabling one tied feature doesn't imply another - the appropriate error for this was already being emitted. I did a bisect and narrowed it down to two patches it was likely to be - something in #128796, probably #128221 or #128679.
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.