diff options
| author | bors <bors@rust-lang.org> | 2016-07-16 21:09:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-16 21:09:15 -0700 |
| commit | 34d7f7e607aec07b6db2ccd5cab42f996220e148 (patch) | |
| tree | 949e0e5f4e415ba9dc569508796e052e1f7bdddf /configure | |
| parent | 103e5c9b37d6cdc4552b353cdf3fd2772dae760c (diff) | |
| parent | b9a35902a20f264aa0b516f7f3a4ff2490a3cf06 (diff) | |
| download | rust-34d7f7e607aec07b6db2ccd5cab42f996220e148.tar.gz rust-34d7f7e607aec07b6db2ccd5cab42f996220e148.zip | |
Auto merge of #34606 - mathstuf:llvm-with-ninja, r=alexcrichton
llvm, rt: build using the Ninja generator if available The Ninja generator generally builds much faster than make. It may also be used on Windows to have a vast speed improvement over the Visual Studio generators. Currently hidden behind an `--enable-ninja` flag because it does not obey the top-level `-j` or `-l` flags given to `make`.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/configure b/configure index fd009a757a4..d2ec457a1c8 100755 --- a/configure +++ b/configure @@ -612,6 +612,7 @@ opt rustbuild 0 "use the rust and cargo based build system" opt orbit 0 "get MIR where it belongs - everywhere; most importantly, in orbit" opt codegen-tests 1 "run the src/test/codegen tests" opt option-checking 1 "complain about unrecognized options in this configure script" +opt ninja 0 "build LLVM using the Ninja generator (for MSVC, requires building in the correct environment)" # Optimization and debugging options. These may be overridden by the release channel, etc. opt_nosave optimize 1 "build optimized rust code" @@ -785,6 +786,17 @@ probe CFG_BISON bison probe CFG_GDB gdb probe CFG_LLDB lldb +if [ -n "$CFG_ENABLE_NINJA" ] +then + probe CFG_NINJA ninja + if [ -z "$CFG_NINJA" ] + then + # On Debian and Fedora, the `ninja` binary is an IRC bot, so the build tool was + # renamed. Handle this case. + probe CFG_NINJA ninja-build + fi +fi + # For building LLVM probe_need CFG_CMAKE cmake @@ -1534,7 +1546,10 @@ do fi # We need the generator later on for compiler-rt even if LLVM's not built - if [ ${is_msvc} -ne 0 ] + if [ -n "$CFG_NINJA" ] + then + generator="Ninja" + elif [ ${is_msvc} -ne 0 ] then case "$CFG_MSVC_ROOT" in *14.0*) |
