Boost logo

Boost-Build :

Subject: Re: [Boost-build] clang toolset for Windows using MingW and built with MSYS
From: Edward Diener (eldiener_at_[hidden])
Date: 2011-07-06 15:07:37


On 7/6/2011 2:46 PM, Jürgen Hunold wrote:
> Hi Edward,
>
> On Wednesday, 6. July 2011 01:53:56 Edward Diener wrote:
>> Evidently it is possible to build clang for Windows usimg MSYS which
>> uses a hardcoded directory path pointing to mingw include and lib
>> directories for its header files and libraries. I successfully built
>> this and will try to use it in sample applications using C, C++, and
>> Windows header files and libraries.
>
> This is good news indeed. Any pointer to a guide for building clang or
> (preferred) binary snapshots.

Get the latest MSYS/MingW from the normal sourceforge site. Then follow
the instructions at http://clang.llvm.org/get_started.html for Unix-like
systems. Basically after using svn to get the llvm and clang source ( I
use TortoiseSVN ), update MSYS's /ect/fstab to point to the root of
wherever the llvm tree is at. My /etc/fstab is:

C:/Utilities/MinGWCurrent /mingw
C:/Programming/VersionControl/llvm /llvm

so I can point to both mingw and the llvm tree. Then I created a
/build/llvm directory, opened my MSYS prompt, cd /build/llvm and finally:

../../llvm/configure

followed by:

make

.

The make step should build all the llvm and clang you need. I did have a
problem, seemingly at the end of 'make', where the llvm sample program
did not build, but when I reported it on the clang and llvm mailing
lists, nobody responded.

To execute clang ( or clang.exe ) so it finds header and libraries you
need your mingw directory structure in a hardcoded place, according to
the documentation at the bottom of
http://clang.llvm.org/docs/UsersManual.html. I just made symbolic links
from where my mingw is actually at ( use mklink command in Windows ).

>
>> Can we have a toolset for clang under Windows ? I have asked this before
>> but it has never been done.
>
> Well, this might be due to the fact that clang is fresh.
> We me might get started if you could provide some sample code include
> commandlines.

I have as little idea of the command lines as anybody else. I really can
not just do this by myself but need others chipping in. I am not a clang
guru by any means and want to use it because it usually presents a
highly conformant compiler.

>
>> It would be a boon for a Windows programmer
>> to be able to test Boost libraries and his own libraries using clang
>> under Windows. Currently I find that only gcc and vc++ really work
>> reliably under Windows, and adding clang would be a big plus in my
>> development efforts with Boost.
>
> Well, clangs template diagnostics are priceless on all platforms.

I agree, which is why I would to see a clang toolset for Windows so I
can use clang with bjam files. But I have no idea how to use the Boost
build jam language and really do not want to take the time to learn to
do so.


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk