]> git.proxmox.com Git - rustc.git/blame - src/bootstrap/main.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / bootstrap / main.rs
CommitLineData
7453a54e
SL
1// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
11#![deny(warnings)]
12
13extern crate bootstrap;
14extern crate build_helper;
15extern crate cmake;
16extern crate filetime;
17extern crate gcc;
18extern crate getopts;
19extern crate libc;
20extern crate num_cpus;
21extern crate rustc_serialize;
22extern crate toml;
54a0048b 23extern crate md5;
7453a54e
SL
24
25use std::env;
26
27use build::{Flags, Config, Build};
28
29mod build;
30
31fn main() {
32 let args = env::args().skip(1).collect::<Vec<_>>();
33 let flags = Flags::parse(&args);
34 let mut config = Config::parse(&flags.build, flags.config.clone());
35 if std::fs::metadata("config.mk").is_ok() {
36 config.update_with_config_mk();
37 }
38 Build::new(flags, config).build();
39}