Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bootstrap/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ path = "rustdoc.rs"

[dependencies]
build_helper = { path = "../build_helper" }
cmake = "0.1.10"
cmake = "0.1.17"
filetime = "0.1"
num_cpus = "0.2"
toml = "0.1"
Expand Down
4 changes: 3 additions & 1 deletion src/bootstrap/build/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use toml::{Parser, Decoder, Value};
#[derive(Default)]
pub struct Config {
pub ccache: bool,
pub ninja: bool,
pub verbose: bool,
pub submodules: bool,
pub compiler_docs: bool,
Expand Down Expand Up @@ -107,6 +108,7 @@ struct Build {
#[derive(RustcDecodable, Default)]
struct Llvm {
ccache: Option<bool>,
ninja: Option<bool>,
assertions: Option<bool>,
optimize: Option<bool>,
version_check: Option<bool>,
Expand Down Expand Up @@ -200,9 +202,9 @@ impl Config {

if let Some(ref llvm) = toml.llvm {
set(&mut config.ccache, llvm.ccache);
set(&mut config.ninja, llvm.ninja);
set(&mut config.llvm_assertions, llvm.assertions);
set(&mut config.llvm_optimize, llvm.optimize);
set(&mut config.llvm_optimize, llvm.optimize);
set(&mut config.llvm_version_check, llvm.version_check);
set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
}
Expand Down
3 changes: 3 additions & 0 deletions src/bootstrap/build/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ pub fn llvm(build: &Build, target: &str) {

// http://llvm.org/docs/CMake.html
let mut cfg = cmake::Config::new(build.src.join("src/llvm"));
if build.config.ninja {
cfg.generator("Ninja");
}
cfg.target(target)
.host(&build.config.build)
.out_dir(&dst)
Expand Down
3 changes: 3 additions & 0 deletions src/bootstrap/build/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ pub fn check(build: &mut Build) {
}
}
need_cmd("cmake".as_ref());
if build.config.ninja {
need_cmd("ninja".as_ref())
}
break
}

Expand Down