VS build failure

Marshall Clow mclow.lists at gmail.com
Tue Oct 1 10:59:29 PDT 2013


On Oct 1, 2013, at 9:52 AM, Chandler Carruth <chandlerc at google.com> wrote:
>>> On Oct 1, 2013, at 8:56 AM, jahanian <fjahanian at apple.com> wrote:
>>> 
>>>> We can disable build of libcxx on our VS buildbots. But, we would like to hear better alternatives/suggestions, if any.
>>>> 
>>>> - Thanks, Fariborz
>>>> 
>>>> 
>>>> On Sep 30, 2013, at 9:03 AM, jahanian <fjahanian at apple.com> wrote:
>>>> 
>>>>> HI Chandler,
>>>>> This patch 
>>>>> Enable libcxx as part of the top level CMake build when it is checked
>>>>> out in projects. This appears to be working on my system, and I will be
>>>>> watching build bots to see if there are any issues on other platforms.
>>>>> 
>>>>> Changed files
>>>>> 
>>>>> src/projects/CMakeLists.txt
>>>>> 
>>>>> causes all libcxx compiles to fail on VS buildbot. AN example of diagnostics would be:
>>>>> 
>>>>>  hash.cpp
>>>>> C:/public/zorg/buildbot/smooshlab/slave-0.8/.../src/projects/libcxx/include\type_traits(927): error C2681: 'add_rvalue_reference<_Tp*>::type' : invalid expression type for dynamic_cast [C:\public\zorg\buildbot\smooshlab\slave-0.8\...\clang-build\210328\projects\libcxx\lib\cxx.vcxproj]
>>>>> C:/public/zorg/buildbot/smooshlab/slave-0.8/.../src/projects/libcxx/include\type_traits(927): error C2681: 'add_rvalue_reference<_Tp*>::type' : invalid expression type for dynamic_cast [C:\public\zorg\buildbot\smooshlab\slave-0.8\...\clang-build\210328\projects\libcxx\lib\cxx.vcxproj]
>>>>> C:/public/zorg/buildbot/smooshlab/slave-0.8/.../src/projects/libcxx/include\type_traits(927): error C2681: 'add_rvalue_reference<_Tp*>::type' : invalid expression type for dynamic_cast [C:\public\zorg\buildbot\smooshlab\slave-0.8\...\clang-build\210328\projects\libcxx\l
>>>>> ib\cxx.vcxproj]C:/public/zorg/buildbot/smooshlab/slave-0.8/.../src/projects/libcxx/include\type_traits(1404): error C2516: 'std::common_type<_Tp>::type' : is not a legal base class [C:\public\zorg\buildbot\smooshlab\slave-0.8\...\clang-build\210328\projects\libcxx\lib\cxx.vcxproj]
>>>>>           with
>>>>>           [
>>>>>               _Tp=
>>>>>           ]
>>>>>           C:/public/zorg/buildbot/smooshlab/slave-0.8/.../src/projects/libcxx/include\type_traits(1328) : see declaration of 'std::common_type<_Tp>::type'
>>>>>           with
>>>>>           [
>>>>>               _Tp=
>>>>>           ]
>>>>> 
>>>>> - Fariborz
>>>> 
> On Tue, Oct 1, 2013 at 11:45 AM, Bob Wilson <bob.wilson at apple.com> wrote:
> If libcxx doesn't build with Visual Studio, then Chandler's patch to enable it should be changed to make it conditional on not using VS.  Chandler, can that be done?
> 
> Yep, just been stuck in meetings. I'll get this after lunch if none beat me to it. Sorry for the delays. 

http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx says that VC does not support SFINAE on expressions.

The offending line is:
template<typename _Tp> char &__is_polymorphic_impl(
    typename enable_if<sizeof((_Tp*)dynamic_cast<const volatile void*>(declval<_Tp*>())) != 0, int>::type);



-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131001/0abde9e5/attachment.html>


More information about the cfe-commits mailing list