Implement a implicit target feature mechanism
This commit is contained in:
parent
90521399b4
commit
80b74d397f
6 changed files with 55 additions and 1 deletions
|
@ -97,6 +97,14 @@ pub fn from_target_feature(
|
|||
Some(Symbol::intern(feature))
|
||||
}));
|
||||
}
|
||||
|
||||
for (feature, requires) in tcx.sess.target.implicit_target_features() {
|
||||
if target_features.iter().any(|f| f.as_str() == *feature)
|
||||
&& !target_features.iter().any(|f| f.as_str() == *requires)
|
||||
{
|
||||
target_features.push(Symbol::intern(requires));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Computes the set of target features used in a function for the purposes of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue