diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2020-07-29 11:37:33 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2020-08-26 14:55:21 -0700 |
| commit | 30b7dac745b1555cd96f41977f7d24435cbe7fa2 (patch) | |
| tree | 04b874ce829d9a8f91f4f13c7cf6f9b47e5407d7 | |
| parent | 48717b6f3ce661d2a0d64f7bdfdfb5fd3484ee5b (diff) | |
| download | rust-30b7dac745b1555cd96f41977f7d24435cbe7fa2.tar.gz rust-30b7dac745b1555cd96f41977f7d24435cbe7fa2.zip | |
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.
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | config.toml.example | 6 | ||||
| -rw-r--r-- | src/bootstrap/config.rs | 1 |
3 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md index 3399f7fe6c8..fe9776bc5f8 100644 --- a/README.md +++ b/README.md @@ -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` diff --git a/config.toml.example b/config.toml.example index 36587cc0784..9abb8add785 100644 --- a/config.toml.example +++ b/config.toml.example @@ -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 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 8b8b01b1153..f549de6570f 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -450,6 +450,7 @@ impl Config { 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; |
