x86-64 hardfloat actually requires sse2

This commit is contained in:
Ralf Jung 2024-12-26 19:47:41 +01:00
parent 0a8cfc2f8f
commit eb527424a5
6 changed files with 54 additions and 15 deletions

View file

@ -753,12 +753,19 @@ pub(crate) fn global_llvm_features(
});
}
} else {
if abi_enable_set.contains(feature) {
sess.dcx().emit_warn(ForbiddenCTargetFeature {
feature,
enabled: "disabled",
reason: "this feature is required by the target ABI",
});
// FIXME: we have to request implied features here since
// negative features do not handle implied features above.
#[allow(rustc::potential_query_instability)] // order does not matter
for &required in abi_enable_set.iter() {
let implied =
sess.target.implied_target_features(std::iter::once(required));
if implied.contains(feature) {
sess.dcx().emit_warn(ForbiddenCTargetFeature {
feature,
enabled: "disabled",
reason: "this feature is required by the target ABI",
});
}
}
}