Subject: Re: [Boost-build] Building with clang for Windows/MingW
From: Edward Diener (eldiener_at_[hidden])
Date: 2014-02-01 16:10:50
On 2/1/2014 12:30 PM, Vladimir Prus wrote:
> On 31.01.2014 03:18, Edward Diener wrote:
>> When trying to test clang under Windows which is built with MingW,
>> which essentially becomes clang-linux as a toolset, Boost Build runs with
>> the options:
>> -c -x c++ -O0 -g -fno-inline -Wall -g -mthreads
>> However clang does not recognize -mthreads and flags it as an error.
>> Is there anything I can do to remove this option from the clang++.exe
>> command line when invoking Boost Build ?
> I though there's another clang-win somewhere in the works?
According to clang web site there are two possible versions of clang on
Windows. One uses the VC++ RTL while the other uses the MingW/gcc RTL.
I am able to create either version on Windows7. However the VC++ RTL
version ( clang-cl ) has numerous problems with Boost because it does
not support VC++-style exception handling nor RTTI, issues already
reported to clang. Also I pointed out to you a minor issue with the
Boost build setup of that version which was created by another person
and tweaked only very slightly by me. You did not seem very interested
in helping to correct that issue and I am not knowledgable enough with
Boost build to do so. Nonetheless that is currently a moot issue since
the issue produced a warning only ( although annoyingly repeatedly with
each compile ), and clang-cl does not work with most of Boost because of
the shortcomings of the clang-cl compiler itself mentioned above.
So now I am interested to see if I can run Boost tests in Windows with
the version of clang that can be built using MingW/gcc RTL.
> clang-linux seems suspicious to me, on Windows.
MingW is supposed to emulate a *Nix environment. To what extent in
relation to using Boost build as clang-linux I do not know.
> If you want to make
> clang-linux work, you probably can declare a function setup-threading in
> clang-linux.jam which basically forwards to gcc.setup-threading,
> except for the case of target-os=windows, where it should do nothing.
> Does this help?
I get the idea. Thanks !
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