Rollup merge of #129940 - liushuyu:s390x-target-features, r=RalfJung
s390x: Fix a regression related to backchain feature In #127506, we introduced a new IBM Z-specific target feature, `backchain`. This particular `target-feature` was available as a function-level attribute in LLVM 17 and below, so some hacks were used to avoid blowing up LLVM when querying the supported LLVM features. This led to an unfortunate regression where `cfg!(target-feature = "backchain")` will always return true. This pull request aims to fix this issue, and a test has been introduced to ensure it will never happen again. Fixes #129927. r? `@RalfJung`
This commit is contained in:
commit
bc2244f027
2 changed files with 47 additions and 3 deletions
|
@ -353,9 +353,7 @@ pub fn target_features(sess: &Session, allow_unstable: bool) -> Vec<Symbol> {
|
|||
None
|
||||
}
|
||||
})
|
||||
.filter(|feature| {
|
||||
RUSTC_SPECIAL_FEATURES.contains(feature) || features.contains(&Symbol::intern(feature))
|
||||
})
|
||||
.filter(|feature| features.contains(&Symbol::intern(feature)))
|
||||
.map(|feature| Symbol::intern(feature))
|
||||
.collect()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue