generalize 'forbidden feature' concept so that even (un)stable feature can be invalid to toggle
Also rename some things for extra clarity
This commit is contained in:
parent
1f3bf231e1
commit
2d887a5c5c
13 changed files with 468 additions and 401 deletions
|
@ -35,10 +35,10 @@ pub type MakeBackendFn = fn() -> Box<dyn CodegenBackend>;
|
|||
pub fn add_configuration(cfg: &mut Cfg, sess: &mut Session, codegen_backend: &dyn CodegenBackend) {
|
||||
let tf = sym::target_feature;
|
||||
|
||||
let unstable_target_features = codegen_backend.target_features(sess, true);
|
||||
let unstable_target_features = codegen_backend.target_features_cfg(sess, true);
|
||||
sess.unstable_target_features.extend(unstable_target_features.iter().cloned());
|
||||
|
||||
let target_features = codegen_backend.target_features(sess, false);
|
||||
let target_features = codegen_backend.target_features_cfg(sess, false);
|
||||
sess.target_features.extend(target_features.iter().cloned());
|
||||
|
||||
cfg.extend(target_features.into_iter().map(|feat| (tf, Some(feat))));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue