diff options
Diffstat (limited to 'compiler/rustc_codegen_gcc/build_system/src/info.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/build_system/src/info.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_gcc/build_system/src/info.rs b/compiler/rustc_codegen_gcc/build_system/src/info.rs new file mode 100644 index 00000000000..ea38791d38c --- /dev/null +++ b/compiler/rustc_codegen_gcc/build_system/src/info.rs @@ -0,0 +1,19 @@ +use crate::config::ConfigInfo; + +pub fn run() -> Result<(), String> { + let mut config = ConfigInfo::default(); + + // We skip binary name and the `info` command. + let mut args = std::env::args().skip(2); + while let Some(arg) = args.next() { + if arg == "--help" { + println!("Display the path where the libgccjit will be located"); + return Ok(()); + } + config.parse_argument(&arg, &mut args)?; + } + config.no_download = true; + config.setup_gcc_path()?; + println!("{}", config.gcc_path); + Ok(()) +} |
