Compiling LLVM-Clang with MinGW on Windows

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. I installed entire MinGW+MSys packages. I tried to run “make -f Makefile” in Msys command line. But, it just run another ‘cmd.exe’, and not working.

Could you help me on this problem?

Thank you!

Why didn't you take "MSYS Makefiles" on CMake?

FYI, it could be done with cmd.exe and mingw's make.exe (not MSYS's!)
when you took "Mingw Makefiles" on CMake, unless %PATH% contains MSYS
toolchain.

...Takumi

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

Thanks Kenneth and Takumi. The soltuion was very simple. As Takumi pointed out, all I needed to just make MSYS makefiles.