Set ninja=true by default
Ninja substantially improves LLVM build time. On a 96-way system, using Make took 248s, and using Ninja took 161s, a 35% improvement. We already require a variety of tools to build Rust. If someone wants to build without Ninja (for instance, to minimize the set of packages required to bootstrap a new target), they can easily set `ninja=false` in `config.toml`. Our defaults should help people build Rust (and LLVM) faster, to speed up development.
This commit is contained in:
parent
48717b6f3c
commit
30b7dac745
@ -36,6 +36,7 @@ by running `./x.py --help` or reading the [rustc dev guide][rustcguidebuild].
|
||||
* `python` 3 or 2.7
|
||||
* GNU `make` 3.81 or later
|
||||
* `cmake` 3.4.3 or later
|
||||
* `ninja`
|
||||
* `curl`
|
||||
* `git`
|
||||
* `ssl` which comes in `libssl-dev` or `openssl-devel`
|
||||
|
@ -49,10 +49,8 @@
|
||||
# dynamic version to be available.
|
||||
#static-libstdcpp = false
|
||||
|
||||
# Tell the LLVM build system to use Ninja instead of the platform default for
|
||||
# the generated build system. This can sometimes be faster than make, for
|
||||
# example.
|
||||
#ninja = false
|
||||
# Whether to use Ninja to build LLVM. This runs much faster than make.
|
||||
#ninja = true
|
||||
|
||||
# LLVM targets to build support for.
|
||||
# Note: this is NOT related to Rust compilation targets. However, as Rust is
|
||||
|
@ -450,6 +450,7 @@ fn normalize_python_path(path: OsString) -> PathBuf {
|
||||
pub fn default_opts() -> Config {
|
||||
let mut config = Config::default();
|
||||
config.llvm_optimize = true;
|
||||
config.ninja = true;
|
||||
config.llvm_version_check = true;
|
||||
config.backtrace = true;
|
||||
config.rust_optimize = true;
|
||||
|
Loading…
Reference in New Issue
Block a user