pub fn new(flags: Flags, config: Config) -> Build {
        let cwd = t!(env::current_dir());
        let src = flags.src.clone().unwrap_or(cwd.clone());
        let out = cwd.join("build");

        let stage0_root = out.join(&config.build).join("stage0/bin");
        let rustc = match config.rustc {
            Some(ref s) => PathBuf::from(s),
            None => stage0_root.join(exe("rustc", &config.build)),
        };
        let cargo = match config.cargo {
            Some(ref s) => PathBuf::from(s),
            None => stage0_root.join(exe("cargo", &config.build)),
        };
        let local_rebuild = config.local_rebuild;

        Build {
            flags: flags,
            config: config,
            cargo: cargo,
            rustc: rustc,
            src: src,
            out: out,

            release: String::new(),
            unstable_features: false,
            ver_hash: None,
            short_ver_hash: None,
            ver_date: None,
            version: String::new(),
            local_rebuild: local_rebuild,
            bootstrap_key: String::new(),
            bootstrap_key_stage0: String::new(),
            package_vers: String::new(),
            cc: HashMap::new(),
            cxx: HashMap::new(),
            compiler_rt_built: RefCell::new(HashMap::new()),
            gdb_version: None,
            lldb_version: None,
            lldb_python_dir: None,
        }
    }
/// Creates a new set of build configuration from the `flags` on the command
/// line and the filesystem `config`.
///
/// By default all build output will be placed in the current directory.
Creates a new set of build configuration from the `flags` on the command
line and the filesystem `config`.

By default all build output will be placed in the current directory.
Creates a new set of build configuration from the ` flags ` on the command line and the filesystem ` config ` . By default all build output will be placed in the current directory .
pub fn new(flags: Flags, config: Config) -> Build {
        let cwd = t!(env::current_dir());
        let src = flags.src.clone().unwrap_or(cwd.clone());
        let out = cwd.join("build");
        let stage0_root = out.join(&config.build).join("stage0/bin");
        let rustc = match config.rustc {
            Some(ref s) => PathBuf::from(s),
            None => stage0_root.join(exe("rustc", &config.build)),
        };
        let cargo = match config.cargo {
            Some(ref s) => PathBuf::from(s),
            None => stage0_root.join(exe("cargo", &config.build)),
        };
        let local_rebuild = config.local_rebuild;
        Build {
            flags: flags,
            config: config,
            cargo: cargo,
            rustc: rustc,
            src: src,
            out: out,
            release: String::new(),
            unstable_features: false,
            ver_hash: None,
            short_ver_hash: None,
            ver_date: None,
            version: String::new(),
            local_rebuild: local_rebuild,
            bootstrap_key: String::new(),
            bootstrap_key_stage0: String::new(),
            package_vers: String::new(),
            cc: HashMap::new(),
            cxx: HashMap::new(),
            compiler_rt_built: RefCell::new(HashMap::new()),
            gdb_version: None,
            lldb_version: None,
            lldb_python_dir: None,
        }
    }
pub fn new ( flags : Flags , config : Config ) -> Build { let cwd = t ! ( env current_dir ( ) ) ; let src = flags . src . clone ( ) . unwrap_or ( cwd . clone ( ) ) ; let out = cwd . join ( " " ) ; let stage0_root = out . join ( & config . build ) . join ( " " ) ; let rustc = match config . rustc { Some ( ref s ) => PathBuf :: from ( s ) , None => stage0_root . join ( exe ( " " , & config . build ) ) , } ; let cargo = match config . cargo { Some ( ref s ) => PathBuf :: from ( s ) , None => stage0_root . join ( exe ( " " , & config . build ) ) , } ; let local_rebuild = config . local_rebuild ; Build { flags : flags , config : config , cargo : cargo , rustc : rustc , src : src , out : out , release : String :: new ( ) , unstable_features : false , ver_hash : None , short_ver_hash : None , ver_date : None , version : String :: new ( ) , local_rebuild : local_rebuild , bootstrap_key : String :: new ( ) , bootstrap_key_stage0 : String :: new ( ) , package_vers : String :: new ( ) , cc : HashMap :: new ( ) , cxx : HashMap :: new ( ) , compiler_rt_built : RefCell :: new ( HashMap :: new ( ) ) , gdb_version : None , lldb_version : None , lldb_python_dir : None , } }
Creates a new set of build configuration from the `flags` on the command
line and the filesystem `config`.
Creates a new set of build configuration from the ` flags ` on the command line and the filesystem ` config ` .
flags
Flags
config
Config
flags
Flags
config
Config