]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/flags.rs
Rollup merge of #95341 - Meziu:armv6k-3ds-target, r=nagisa
[rust.git] / src / bootstrap / flags.rs
index 74528f2752f5fbca85fcc949be59faa982642ae8..1a4e6a9688803b544295aa7d1c7ba0d5d2d9c2d0 100644 (file)
@@ -3,16 +3,15 @@
 //! This module implements the command-line parsing of the build system which
 //! has various flags to configure how it's run.
 
-use std::env;
 use std::path::PathBuf;
 use std::process;
 
-use build_helper::t;
 use getopts::Options;
 
 use crate::builder::Builder;
 use crate::config::{Config, TargetSelection};
 use crate::setup::Profile;
+use crate::util::t;
 use crate::{Build, DocTests};
 
 pub enum Color {
@@ -541,7 +540,6 @@ pub fn parse(args: &[String]) -> Flags {
         // Get any optional paths which occur after the subcommand
         let mut paths = matches.free[1..].iter().map(|p| p.into()).collect::<Vec<PathBuf>>();
 
-        let cfg_file = env::var_os("BOOTSTRAP_CONFIG").map(PathBuf::from);
         let verbose = matches.opt_present("verbose");
 
         // User passed in -h/--help?
@@ -671,7 +669,7 @@ pub fn parse(args: &[String]) -> Flags {
             } else {
                 None
             },
-            config: cfg_file,
+            config: matches.opt_str("config").map(PathBuf::from),
             jobs: matches.opt_str("jobs").map(|j| j.parse().expect("`jobs` should be a number")),
             cmd,
             incremental: matches.opt_present("incremental"),