[I’m posting to the Clang dev list in case anyone else want to add something]
I should get round to finishing that Windows user guide I was writing ;¬)
First, understand that Clang is a sub-project of LLVM, so to get the right build environment first check out LLVM from SVN, then check out Clang into the LLVM tools directory. I’m using RapidSVN for my SVN client, although that is proving fiddly when generating patch files:
Second, download and install cmake. Once you have LLVM/Clang checked out you can run cmake to create project files for your windows compiler of choice.
http://www.cmake.org/cmake/help/install.html
In theory it should support cygwin, MinGW and multiple Visual Studio versions, although I could not get MinGW to configure neatly for me.
If you don’t have any of these compilers, you can download the Visual C++ Express edition – that is that I am using <g>. The cmake project generated for Visual Studio 2008 works just fine with the express edition.
Finally, some of the cmake tools seem to want Perl and Python to be available so I downloaded and set those up too, although I seem to have a working system despite not having these tools in the path when running cmake, so maybe those are optional?
For my needs I am purely developing the C++ aspects of Clang, which are essentially running syntax checks only on my test files. I have not yet got Clang/LLVM linking and running C programs because I have not had the need to yet. Also, I am not getting automated running of the test suite yet.
One final hint – when running clang compiler from the command line prompt it is useful to run the command
chcp 65001
This sets your console to use UTF-8 as its code page, which will correctly display any messages using characters outside the 7-bit ASCII range – typically found in string literals.
AlisdairM