rustc_codegen_llvm: fix a regression where backchain feature ...

... can not be correctly gated using #[cfg] macro
This commit is contained in:
liushuyu 2024-09-03 12:42:57 -06:00
parent d6c8169c18
commit e98e88bfdf

View file

@ -353,9 +353,7 @@ pub fn target_features(sess: &Session, allow_unstable: bool) -> Vec<Symbol> {
None None
} }
}) })
.filter(|feature| { .filter(|feature| features.contains(&Symbol::intern(feature)))
RUSTC_SPECIAL_FEATURES.contains(feature) || features.contains(&Symbol::intern(feature))
})
.map(|feature| Symbol::intern(feature)) .map(|feature| Symbol::intern(feature))
.collect() .collect()
} }