enabling libc++ by default when building with clang
Dimitry Andric
dim at FreeBSD.org
Mon Sep 17 20:06:54 UTC 2012
On 2012-09-17 21:10, Brooks Davis wrote:
> Now that we have the COMPILER_TYPE variable I'm following up on an idea
> by theraven@ that we should enable libc++ by default when we are
> building world with a compiler that supports it. The following patch
> implements this:
>
> http://people.freebsd.org/~brooks/patches/libc%2b%2b-default.diff
>
> One key question is, when do we want to throw this switch? Do we do it
> now so people using clang start using it sooner or do we wait until
> we've switched the default compiler and things have settled a bit?
Well, building libc++ does not mean automatically using it. What is the
use case for only building (and installing) libc++, but not linking it
to anything? Just so people could build something with it later on?
In any case, I have been building libc++ for a long time now, and also
did some commits left and right to be able to actually use it for the
base system, e.g. all C++ programs in my installations are already
linked to libc++ (dynamically or statically). I have seen no problems
at all, and I am even working on a WITHOUT_LIBSTDCPLUSPLUS option. :)
I think the end goal should be to enable building and using libc++ with
one switch. And sooner or later, to make that the default. Then
FreeBSD will finally be able to use C++0x and C++11 features natively.
More information about the freebsd-toolchain
mailing list