Skip to content

Commit f06f568

Browse files
committed
x86-64 hardfloat actually requires sse2
1 parent e6e72ce commit f06f568

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/gcc_util.rs

+12-6
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,18 @@ pub(crate) fn global_gcc_features(sess: &Session, diagnostics: bool) -> Vec<Stri
129129
});
130130
}
131131
} else {
132-
if abi_enable_set.contains(feature) {
133-
sess.dcx().emit_warn(ForbiddenCTargetFeature {
134-
feature,
135-
enabled: "disabled",
136-
reason: "this feature is required by the target ABI",
137-
});
132+
// FIXME: we have to request implied features here since
133+
// negative features do not handle implied features above.
134+
#[allow(rustc::potential_query_instability)] // order does not matter
135+
for &required in abi_enable_set.iter() {
136+
let implied = sess.target.implied_target_features(std::iter::once(required));
137+
if implied.contains(feature) {
138+
sess.dcx().emit_warn(ForbiddenCTargetFeature {
139+
feature,
140+
enabled: "disabled",
141+
reason: "this feature is required by the target ABI",
142+
});
143+
}
138144
}
139145
}
140146

0 commit comments

Comments
 (0)