]>
Commit | Line | Data |
---|---|---|
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 | ||
13 | extern crate bootstrap; | |
14 | extern crate build_helper; | |
15 | extern crate cmake; | |
16 | extern crate filetime; | |
17 | extern crate gcc; | |
18 | extern crate getopts; | |
19 | extern crate libc; | |
20 | extern crate num_cpus; | |
21 | extern crate rustc_serialize; | |
22 | extern crate toml; | |
54a0048b | 23 | extern crate md5; |
7453a54e SL |
24 | |
25 | use std::env; | |
26 | ||
27 | use build::{Flags, Config, Build}; | |
28 | ||
29 | mod build; | |
30 | ||
31 | fn 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 | } |