[cfe-dev] Clang for Windows and Boost
Douglas Gregor
dgregor at apple.com
Thu Mar 17 13:19:03 PDT 2011
On Mar 17, 2011, at 11:02 AM, Edward Diener wrote:
> On 3/17/2011 1:39 PM, Douglas Gregor wrote:
>>
>> On Mar 17, 2011, at 9:37 AM, Larry Evans wrote:
>>
>>> On 03/17/11 11:04, Edward Diener wrote:
>>>> Thanks to the help I received I have been able to build clang for
>>>> Windows both using MingW and VC++ 10. Are either, or both, of these
>>>> builds stable, in that they can be used for building Boost and other 3rd
>>>> party libraries ?
>>>>
>>>> If so, I am going to try to get some of the Boost Build experts to
>>>> supply a toolset for clang under Windows so it can be used to build and
>>>> test Boost libraries under Windows. Currently the clang toolset support
>>>> in Boost works only under Linux as I understand it.
>>> Hi Edward,
>>>
>>> I had problems with using move and clang on linux:
>>>
>>> http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013216.html
>>>
>>> I also tried a workaround using the libcxx; however, that also had
>>> problems:
>>>
>>> http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013246.html
>>>
>>> Hence, I don't think clang is usable on linux yet.
>>
>>
>> This is horribly misleading. Clang is a perfectly reasonable C++98/03 compiler on Linux.
>>
>> The issues you ran into concern C++0x, where the world is much messier. The C++0x situation on Linux is admittedly frustrating because of library issues:
>> - libstdc++<= 4.4 doesn't work with a C++0x compiler that implements the current WP's formulation of rvalue references. Jeffrey Yasskin provided a patch for this.
>> - libc++ hasn't been fully ported to Linux
>> - libstdc++>= 4.5 has an issue with generalized initializer lists; I worked around that problem in Clang, but I don't know if this is the last problem with these libraries or just the first.
>
> I am not concerned about Linux.
>
> Can clang built with MingW/MSYS ( or less probably VC++10 ) compile
> Boost under Windows ?
I would expect it to be possible with MinGW/MSYS, but not with VC++10. The basic problem is the C++ library headers: MinGW/MSYS uses libstdc++, which Clang can handle; VC++ has a lot of non-standard C++ in its headers that Clang does not currently handle. [*]
> If so, can we get a toolset in Boost Build to use
> clang under Windows so Boost libraries can be tested in Windows using
> clang ?
I think that would be great. I don't know if we have that expertise here in the Clang side of the world... there was work on Clang support in Boost.Build for Linux; perhaps that can be ported over to create a Boost.Build description for Clang on MinGW/MSYS.
- Doug
[*] Francois Pichet is making exciting progress in this area, but we're not to the point where it will be generally usable for C++ code.
More information about the cfe-dev
mailing list