about summary refs log tree commit diff
path: root/compiler/rustc_driver/src
diff options
context:
space:
mode:
authorLoïc BRANSTETT <lolo.branstett@numericable.fr>2021-09-29 02:39:30 +0200
committerLoïc BRANSTETT <lolo.branstett@numericable.fr>2022-02-16 13:03:12 +0100
commit3a73ca587bb8a8fb52d6045fbe31d50d5a56ff19 (patch)
tree37a0d4e25436b3524bb8e1b876f009dad1824f64 /compiler/rustc_driver/src
parent6499c5e7fc173a3f55b7a3bd1e6a50e9edef782d (diff)
downloadrust-3a73ca587bb8a8fb52d6045fbe31d50d5a56ff19.tar.gz
rust-3a73ca587bb8a8fb52d6045fbe31d50d5a56ff19.zip
Implement --check-cfg option (RFC 3013)
Co-authored-by: Urgau <lolo.branstett@numericable.fr>
Co-authored-by: Marcelina Kościelnicka <mwk@0x04.net>
Diffstat (limited to 'compiler/rustc_driver/src')
-rw-r--r--compiler/rustc_driver/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs
index ca4e7b5142e..dd235063b5c 100644
--- a/compiler/rustc_driver/src/lib.rs
+++ b/compiler/rustc_driver/src/lib.rs
@@ -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,