[cfe-dev] 回复: 回复: [Windows toolchain] link failures from command prompt

湖西Zero lifangmu at foxmail.com
Wed Oct 2 10:57:47 PDT 2013


When I use clang-cl,It hava too much error:
 D:\LLVM[x64]>clang-cl base.cpp
error: cannot mangle RTTI descriptors for type 'failure' yet
error: cannot mangle the name of type 'failure' into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type 'system_error' yet
error: cannot mangle the name of type 'system_error' into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type 'runtime_error' yet
error: cannot mangle the name of type 'runtime_error' into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type 'exception' yet
error: cannot mangle the name of type 'exception' into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type 'failure' yet
error: cannot mangle the name of type 'failure' into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type 'system_error' yet
error: cannot mangle the name of type 'system_error' into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type 'runtime_error' yet
error: cannot mangle the name of type 'runtime_error' into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type 'exception' yet
error: cannot mangle the name of type 'exception' into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type 'failure' yet
error: cannot mangle the name of type 'failure' into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type 'system_error' yet
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
  
  
 
------------------


 




------------------ 原始邮件 ------------------
发件人: "Reid Kleckner"; 
发送时间: 2013年10月3日(星期四) 凌晨1:27
收件人: "湖西Zero"; 
抄送: "Clang"; 
主题: Re: [cfe-dev]回复: [Windows toolchain] link failures from command prompt



As mentioned in the bug (http://llvm.org/bugs/show_bug.cgi?id=17428#c3), the best supported way to use the MS C++ ABI is to use clang-cl.exe.  Joao mentions the other way to switch the C++ ABI dynamically, but it's an internal -cc1 flag subject to change. 

 Long term, if the OS is set to win32 (not mingw32) via the --target= flag, I would like that to imply the Microsoft C++ ABI, rather than the weird not-mingw-but-still-Itanium hybrid we use today.  That will require changes to the test suite, and I'd like to fix virtual inheritance first.

 

 On Wed, Oct 2, 2013 at 1:44 AM, 湖西Zero <lifangmu at foxmail.com> wrote:
  I look over clang source, It have Microsoft CXXABI.cpp in clang/lib/CodeGen/,support Microsoft C++ ABI;I recommend to open a default C + + ABI's cmake variable when you use VisualStudio + cmake build clang when the default C + + ABI for the Microsoft C + + ABI, and in the clang's "driver" to support dynamically assigned - ABI = Microsoft or - ABI = Itanium,
  
  ------------------
 

  
 

 

 ------------------ 原始邮件 ------------------
  发件人: "Richard Smith"; 
 发送时间: 2013年10月2日(星期三) 上午8:27
 收件人: "湖西Zero"; "bdawes"; "cfe-dev"; 
 主题: Re: [cfe-dev] [Windows toolchain] link failures from command prompt

   

  On Tue, Oct 1, 2013 at 7:46 AM, 湖西Zero <lifangmu at foxmail.com> wrote:
   I know,Visual Studio Use Microsoft C++ ABI,But Clang Use Itanium ABI ,They are not the same as Name mangling。
 

 Clang does support a lot of the MS C++ ABI, but the 'clang++' driver defaults to using the Itanium ABI. See the comments on the bug for more information.
  
   ------------------
 

  
 

 

 ------------------ Original ------------------
  From: "Beman Dawes"; 
 Date: 2013年10月1日(星期二) 晚上10:19
 To: "Clang"; 
 Subject: [cfe-dev] [Windows toolchain] link failures from command prompt

   

I just filed a bug report (http://llvm.org/bugs/show_bug.cgi?id=17428)
against LLVM-3.4.r191323-win32.exe. Here is the rationale for considering
failure to link under the "Developer Command Prompt for VS2012" a bug:

Boost developers and test runners, and probably lots of other folks too, run
their automated tests from the command prompt rather than via the IDE. So it
is a showstopper for these folks if the clang windows toolchain doesn't work
from the command prompt.

In my little hello.cpp test the clang++ compile was clean, but the link had
unresolved externals like "hello-111ee3.o : error LNK2019: unresolved
external symbol __ZSt4cout referenced in function _main".

That's particularly frustrating since it is so close to working!

Once the command prompt is working, I'll submit a patch to
http://llvm.org/builds/ explaining how to use it.

Thanks,

--Beman


_______________________________________________
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/20131003/79f8bc3f/attachment.html>


More information about the cfe-dev mailing list