[LLVMdev] Compiling LLVM-Clang with MinGW on Windows

Kenneth Boyd zaimoni at zaimoni.com
Sat Feb 12 19:41:53 PST 2011


On 2/12/2011 6:58 PM, nullnull wrote:
> I'm a Windows user, and wish to run LLVM-Clang on Windows.
> In Visual Studio 2010, buidling was fairly straightforward via the 
> solution file from CMake. However, there is no good document (thought 
> I searched for an hour) how to compile LLVM with MinGW on Windows.
> I generated MinGW Makefile and build directories from CMake.
Ok.
> I installed entire MinGW+MSys packages.
That's your problem.  CMake actively refuses to generate makefiles for 
MingW32 if any flavor of the *NIX shell sh is on your path, including 
the sh provided by the MingW32 project.  If you regenerate the makefile, 
it should autodetect MSYS in such a case.

If the MSYS-targeted makefiles are broken (on my slightly non-standard 
MingW32 install with MSYS utilities, this is due to path format issues), 
you should look at my workaround : 
http://public.kitware.com/Bug/view.php?id=7870 .  I have needed this 
workaround for all of CMake 2.6.2, 2.6.4, and 2.8.0, and expect the 
workaround to be needed indefinitely due to complete and utter lack of 
interest in a proper patch.

Kenneth



More information about the llvm-dev mailing list