1
Fork 0

mark some target features as 'forbidden' so they cannot be (un)set

For now, this is just a warning, but should become a hard error in the future
This commit is contained in:
Ralf Jung 2024-09-02 11:45:59 +02:00
parent 2dece5bb62
commit ffad9aac27
23 changed files with 372 additions and 158 deletions

View file

@ -491,8 +491,9 @@ pub fn target_features(
) -> Vec<Symbol> {
// TODO(antoyo): use global_gcc_features.
sess.target
.supported_target_features()
.rust_target_features()
.iter()
.filter(|(_, gate, _)| gate.is_supported())
.filter_map(|&(feature, gate, _)| {
if sess.is_nightly_build() || allow_unstable || gate.is_stable() {
Some(feature)