Implement --check-cfg option (RFC 3013)

Co-authored-by: Urgau <lolo.branstett@numericable.fr>
Co-authored-by: Marcelina Kościelnicka <mwk@0x04.net>
This commit is contained in:
Loïc BRANSTETT 2021-09-29 02:39:30 +02:00
parent 6499c5e7fc
commit 3a73ca587b
27 changed files with 365 additions and 7 deletions

View file

@ -216,10 +216,12 @@ fn run_compiler(
}
let cfg = interface::parse_cfgspecs(matches.opt_strs("cfg"));
let check_cfg = interface::parse_check_cfg(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,
input: Input::File(PathBuf::new()),
input_path: None,
output_file: ofile,