1
Fork 0

Rollup merge of #117376 - nnethercote:rustc_interface-more, r=oli-obk

More `rustc_interface` cleanups

In particular, following up #117268 with more improvement to `--cfg`/`--check-cfg` handling.

r? ``@oli-obk``
This commit is contained in:
Guillaume Gomez 2023-10-30 17:33:18 +01:00 committed by GitHub
commit d96bdbe218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 295 additions and 422 deletions

View file

@ -317,13 +317,11 @@ fn run_compiler(
return Ok(());
}
let cfg = interface::parse_cfg(&early_error_handler, matches.opt_strs("cfg"));
let check_cfg = interface::parse_check_cfg(&early_error_handler, matches.opt_strs("check-cfg"));
let (odir, ofile) = make_output(&matches);
let mut config = interface::Config {
opts: sopts,
crate_cfg: cfg,
crate_check_cfg: check_cfg,
crate_cfg: matches.opt_strs("cfg"),
crate_check_cfg: matches.opt_strs("check-cfg"),
input: Input::File(PathBuf::new()),
output_file: ofile,
output_dir: odir,