forbid toggling x87 and fpregs on hard-float targets

This commit is contained in:
Ralf Jung
2024-11-16 10:26:46 +01:00
parent 2d887a5c5c
commit d6ddc73dae
20 changed files with 129 additions and 8 deletions

View File

@@ -2603,6 +2603,18 @@ impl TargetOptions {
.collect();
}
}
pub(crate) fn has_feature(&self, search_feature: &str) -> bool {
self.features.split(',').any(|f| {
if let Some(f) = f.strip_prefix('+')
&& f == search_feature
{
true
} else {
false
}
})
}
}
impl Default for TargetOptions {