[cfe-dev] Building LLVM+Clang with Clang+libc++

Jean-Daniel Dupas devlists at shadowlab.org
Tue Aug 2 10:39:01 PDT 2011


Le 2 août 2011 à 19:01, David Blaikie a écrit :

>> I'm not sure how to check that it's actually using libc++ (I
>> suppose I could break one of the libc++ headers & see what happens, or
>> access a non-existent member of an standard template & see which
>> headers it points to)
> 
> So I added a simple break ("std::copy(1, 2, 3)") to see which stdlib
> my build was using (when I configured it with CC=/path/to/clang
> CXX=/path/to/clang++ CXXFLAGS=-stdlib=libc++) & it seems to still be
> using libstdc++, not libc++. I can run "make CXXFLAGS=-stdlib=libc++"
> & I get errors in the relevant headers, but I was hoping to get that
> baked into my build options.
> 

> Any ideas how I could specify this to the configure command/bake it
> into the build?

Probably not the cleanest way to do it, but you can pass the -stdlib flag directly when defining CXX:

CXX="/path/to/clang++ -stdlib=libc++"


-- Jean-Daniel








More information about the cfe-dev mailing list