1
Fork 0

Rollup merge of #133029 - veluca93:abi-checks-tier3, r=workingjubilee

ABI checks: add support for some tier3 arches, warn on others.

Followup to
- https://github.com/rust-lang/rust/pull/132842
- https://github.com/rust-lang/rust/pull/132173
- https://github.com/rust-lang/rust/issues/131800

r? ``@workingjubilee``
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-11-17 23:56:08 +08:00 committed by GitHub
commit 2d9690d2e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 17 deletions

View file

@ -36,9 +36,7 @@ fn do_check_abi<'tcx>(
target_feature_def: DefId,
mut emit_err: impl FnMut(Option<&'static str>),
) {
let Some(feature_def) = tcx.sess.target.features_for_correct_vector_abi() else {
return;
};
let feature_def = tcx.sess.target.features_for_correct_vector_abi();
let codegen_attrs = tcx.codegen_fn_attrs(target_feature_def);
for arg_abi in abi.args.iter().chain(std::iter::once(&abi.ret)) {
let size = arg_abi.layout.size;