[LLVMdev] Ninja build available for Visual Studio users

Óscar Fuentes ofv at wanadoo.es
Tue Jun 12 20:33:15 PDT 2012


Building LLVM with Visual Studio is a bit of a pain because the
available methods are slow and doesn't make good use of multiprocessor
systems.

>From now on it is possible to build LLVM+Clang with the usual cmake
method but using Ninja, an ultra-fast tool that knows how to take
advantage of the availabe execution threads. Ultra-fast is no
exageration: with a warm cache, a no-op build of LLVM is done in less
than half a second.

Rigth now Ninja/VS support is activated on a cmake experimental build,
with strong possibilities of making its way into the next official
release. For now, you need to build the patched cmake+ninja yourselves
or download the executables from

http://sourceforge.net/projects/cmakescript/files/

Download and install cmake-Ninja-2.8.8.*-win32-x86.exe, then download
ninja.exe to the `bin' subdirectory of the place where you installed
cmake. Then proceed to build LLVM:

mkdir myLLVMbuildWithNinja
cd myLLVMbuildWithNinja
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release path/to/llvm/source/root
ninja

(be sure to use the cmake you just installed, not the one you already
had on the system)

If you prefer to build cmake+ninja yourselves, read the thread

http://news.gmane.org/find-root.php?group=gmane.comp.programming.tools.cmake.devel&article=3903

(long, sorry) or ask on the cmake developer's mailing list for pointers,
as right now the exact sources are a bit of a moving target. If you find
bugs building LLVM or any other cmake-based project with ninja, please
report them on cmake's developers mailing list, available through gmane:

http://dir.gmane.org/gmane.comp.programming.tools.cmake.devel

or via e-mail:

http://www.cmake.org/mailman/listinfo/cmake-developers

About ninja:

http://martine.github.com/ninja/




More information about the llvm-dev mailing list