[Development] Qt 4.8 clang and libc++

Thiago Macieira thiago.macieira at intel.com
Mon Sep 3 09:39:45 CEST 2012


On segunda-feira, 3 de setembro de 2012 08.27.43, Olivier Goffart wrote:
> > #include <utility>
> > #if defined(__clang__) && !defined(_LIBCPP_VERSION)
> > #  error "C++11 with clang requires libc++ runtime"
> > #endif
> 
> But why do we require libc++?  What's wrong with using the standard library
> from recent GCC?

Because libstdc++ contains GCC'isms and doesn't contain the Clang'isms that 
Clang requires. What's more, Clang supports certain C++11 features that GCC 
doesn't, so their Standard Library contains the matching features.

> The way to do the detection should be to include the relevant standard
> headers and check they compile fine.

That wouldn't scale. The internals of those libraries are, well, internals. 
We'd need to test every combination of libstdc++ release and patched release 
with Clang, plus the same the other way around (GCC and libc++).

That also includes future releases...

That means basically trying to compile Qt with that compiler+header 
combination to see if it works.

> Else, libc++ should probably be installed on the CI machines.

We should do that.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120903/79549fa6/attachment.sig>


More information about the Development mailing list