Rollup merge of #93915 - Urgau:rfc-3013, r=petrochenkov
Implement --check-cfg option (RFC 3013), take 2 This pull-request implement RFC 3013: Checking conditional compilation at compile time (https://github.com/rust-lang/rfcs/pull/3013) and is based on the previous attempt https://github.com/rust-lang/rust/pull/89346 by `@mwkmwkmwk` that was closed due to inactivity. I have address all the review comments from the previous attempt and added some more tests. cc https://github.com/rust-lang/rust/issues/82450 r? `@petrochenkov`
This commit is contained in:
commit
576afec73a
27 changed files with 365 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue