Honor current target when checking conditional compilation values

This is fixed by simply using the currently registered target in the
current session. We need to use it because of target json that are not
by design included in the rustc list of targets.
This commit is contained in:
Urgau 2023-03-09 21:10:08 +01:00
parent 39f2657d11
commit 3455d66041
5 changed files with 51 additions and 4 deletions

View file

@ -110,7 +110,7 @@ pub fn create_session(
add_configuration(&mut cfg, &mut sess, &*codegen_backend);
let mut check_cfg = config::to_crate_check_config(check_cfg);
check_cfg.fill_well_known();
check_cfg.fill_well_known(&sess.target);
sess.parse_sess.config = cfg;
sess.parse_sess.check_config = check_cfg;