Boost logo

Boost-Build :

Subject: Re: [Boost-build] Building with clang for Windows/MingW
From: Joshua Boyce (raptorfactor_at_[hidden])
Date: 2014-02-03 23:07:14


On 2 February 2014 08:10, Edward Diener <eldiener_at_[hidden]> wrote:

> 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.
>
>
> Picking
>> 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 !
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/
> mailman/listinfo.cgi/boost-build
>

Hi Edward,

Would you mind posting (or even better - committing) a patch if you get
this working? I hit the same roadblock (and I expect others may have also)
and didn't have the time or Boost.Build knowledge to overcome it.

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