forbid toggling x87 and fpregs on hard-float targets
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user