]>
git.proxmox.com Git - rustc.git/blob - src/bootstrap/bin/main.rs
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.
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.
11 //! rustbuild, the Rust build system
13 //! This is the entry point for the build system used to compile the `rustc`
14 //! compiler. Lots of documentation can be found in the `README.md` file next to
15 //! this file, and otherwise documentation can be found throughout the `build`
16 //! directory in each respective module.
20 extern crate bootstrap
;
24 use bootstrap
::{Flags, Config, Build}
;
27 let args
= env
::args().skip(1).collect
::<Vec
<_
>>();
28 let flags
= Flags
::parse(&args
);
29 let mut config
= Config
::parse(&flags
.build
, flags
.config
.clone());
31 // compat with `./configure` while we're still using that
32 if std
::fs
::metadata("config.mk").is_ok() {
33 config
.update_with_config_mk();
36 Build
::new(flags
, config
).build();