[cfe-dev] RTTI on Windows
Reid Kleckner
rnk at google.com
Mon Feb 3 15:18:07 PST 2014
Thanks for trying it!
MSVC compatible RTTI is not yet implemented. Try disabling RTTI with /GR-
or the corresponding IDE project property checkbox. This example compiles
fine for me.
On Sat, Feb 1, 2014 at 4:37 PM, Klaim - Joël Lamotte <mjklaim at gmail.com>wrote:
> Hi,
>
> I just read http://llvm.org/bugs/show_bug.cgi?id=18332
> and http://llvm.org/bugs/show_bug.cgi?id=17403 after finding the
> following issue (first attempt at using the toolchain for windows).
> Am I correct that the following problem is also due to the lack of RTTI
> support?
> It looks like I can't use std::array.
>
> Program (compiled with LLVM-VS2013):
>
> #include <array>
> int main()
> {
> std::array<int,42> my_array;
> }
>
> Output:
>
> ------ Build started: Project: Test_ClangToolchain, Configuration: Debug
> Win32 ------
> 1>clang-cl.exe : warning : argument unused during compilation: '/ZI'
> 1>clang-cl.exe : warning : argument unused during compilation: '/Gm'
> 1>clang-cl.exe : warning : argument unused during compilation: '/EHsc'
> 1>clang-cl.exe : warning : argument unused during compilation: '/GS'
> 1>clang-cl.exe : warning : argument unused during compilation:
> '/fp:precise'
> 1>clang-cl.exe : warning : argument unused during compilation:
> '/FdDebug\vc120.pdb'
> 1>clang-cl.exe : warning : argument unused during compilation: '/Gd'
> 1>main.cpp(4,23): warning : unused variable 'my_array' [-Wunused-variable]
> 1> std::array<int,42> my_array;
> 1> ^
> 1>CL : error : cannot mangle RTTI descriptors for type 'codecvt' yet
> 1>CL : error : cannot mangle the name of type 'codecvt' into RTTI
> descriptors yet
> 1>CL : error : cannot mangle RTTI descriptors for type 'codecvt_base' yet
> 1>CL : error : cannot mangle the name of type 'codecvt_base' into RTTI
> descriptors yet
> 1>CL : error : cannot mangle RTTI descriptors for type 'facet' yet
> 1>CL : error : cannot mangle the name of type 'facet' into RTTI
> descriptors yet
> 1>CL : error : cannot mangle RTTI descriptors for type '_Facet_base' yet
> 1>CL : error : cannot mangle the name of type '_Facet_base' into RTTI
> descriptors yet
> 1> 1 warning and 8 errors generated.
> Build has been canceled.
> Build Summary
> -------------
> 00:02.032 - Failed - Debug Win32 -
> Test_ClangToolchain\Test_ClangToolchain.vcxproj
>
> Total build time: 00:02.032
>
> ========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped,
> Completed at 2014/02/02 01:33:41 ==========
>
>
>
> On Wed, Jan 8, 2014 at 8:57 PM, David Majnemer <david.majnemer at gmail.com>wrote:
>
>> Hello Daniel,
>>
>> I am currently working on an implementation of RTTI for MSVC
>> compatibility. As it stands, there is a lot left to do.
>>
>> If you'd like to help me, I think a good first step that has to happen is
>> to achieve an understanding of what the different flags mean in the Base
>> Class Descriptors.
>>
>> I'm available on IRC if you have any specific questions.
>>
>> --
>> David Majnemer
>>
>>
>> On Wed, Jan 8, 2014 at 11:20 AM, Daniel Olivier <dan_olivier at hotmail.com>wrote:
>>
>>> Hello,
>>>
>>> I've recently started using Clang on Windows (VC10), and quickly ran
>>> into this limitation.
>>> I have started to try to split the code paths into Itanium-specific and
>>> Microsoft-specific methods, but lack a bit of experience with Clang to
>>> really get this off the ground.
>>>
>>> Undoubtedly, I'm making a serious mistake, but it seems to me that this
>>> is a serious limitation (in the Windows world, where it is not at all
>>> common practice to have access to all the source code for all the
>>> dependencies). I see this as a problem stemming from the failure to link
>>> with existing libraries (precompiled with MS-style compilers, such as the
>>> CRT), and therefore an ABI issue.
>>>
>>> I would like to help to try to produce a solution. I've seen the code
>>> and realize this is a large (huge?) undertaking. Is it even thinkable
>>> (for some reason that escapes now me)?
>>>
>>> The question is: who has any specific knowledge of this part of the code
>>> (RTTI and virtual table construction)? Among those people, are there any
>>> who could spare some time to comment on this undertaking and perhaps
>>> provide a bit of guidance? Has anyone already tried to do this, or has it
>>> slated?
>>>
>>> Thanks,
>>> Dan
>>>
>>>
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>>
>>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140203/9b4cbe7d/attachment.html>
More information about the cfe-dev
mailing list