<p dir="ltr">This thread seems to have gone in a strange direction - using clang does not imply or require using libc++.</p>
<p dir="ltr">To answer your original question: this is essentially fine/correct modulo bugs and version incompatibilities (the two compilers don't necessarily line up perfectly with respect to feature, bug, etc implementation at all times)</p>
<p dir="ltr"> You can compile parts of your c++ program (including using c++ standard library types on that interface boundary) with clang and parts with gcc (both using the same standard library) and they should link and run correctly together.</p>
<p dir="ltr">(If you're curious about the nitty gritty of why this works, its related to a thing called the ABI, and specifically the itanium ABI)</p>
<div class="gmail_quote">On Jul 24, 2015 12:40 AM, "Ankit Garg" <<a href="mailto:Ankit_Garg@mentor.com">Ankit_Garg@mentor.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
         I am not sure whether its the right forum to ask this question.  I am trying to move to clang compiler from GCC, but our software has tons of components independently developed provding different static archive libraries. All these libraries are finally linked into executable.  Now rather than compiling every component with clang from scratch, I was thinking to pick one component at time to compile with clang and use GCC compiled static archives for other components to link into executable using clang compiler.  Would this always work ?<br>
<br>
So my question is whether GCC compiled object/archives involving C/C++ code would always be compatible with clang generated object files and can be mixed together during link step using clang compiler.  Would this always work if I can make sure that our libraries are not using any features of C++11 .<br>
<br>
<br>
Regards<br>
Ankit<br>
<br>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@cs.uiuc.edu" target="_blank">cfe-users@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users</a><br>
</blockquote></div>