Keep unstable target features for asm feature checking

Inline assembly uses the target features to determine which registers
are available on the current target. However it needs to be able to
access unstable target features for this.

Fixes #99071
This commit is contained in:
Amanieu d'Antras 2022-07-11 14:26:58 +01:00
parent 50b00252ae
commit e51f1b7e27
8 changed files with 38 additions and 28 deletions

View file

@ -48,7 +48,10 @@ pub fn add_configuration(
) {
let tf = sym::target_feature;
let target_features = codegen_backend.target_features(sess);
let unstable_target_features = codegen_backend.target_features(sess, true);
sess.unstable_target_features.extend(unstable_target_features.iter().cloned());
let target_features = codegen_backend.target_features(sess, false);
sess.target_features.extend(target_features.iter().cloned());
cfg.extend(target_features.into_iter().map(|feat| (tf, Some(feat))));