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

Jean-Daniel Dupas devlists at shadowlab.org
Wed Aug 3 08:55:14 PDT 2011


Le 3 août 2011 à 16:54, David Blaikie a écrit :

>> New Scenario includes your request to build LLVM/Clang/Clang++ against
>> libc++
>> 
>> Configuration trick to get it to build my set up is as follow:
>> 
>>   $ ../trunk/llvm/configure && ../trunk/llvm/configure
>> --enable-target=x86_64,arm,cpp,cbe --with-clang=/usr/local/bin/clang
>> --with-built-clang --enable-pic --enable-polly --enable-shared
>> --with-cxx-include-arch=x86_64 --enable-optimized --with-optimize-option=-O2
>> --enable-assertions --disable-bootstrap --disable-multilib --enable-jit
>> --enable-threads --no-create --no-recursion CXX='/usr/local/bin/clang++'
>> CXXFLAGS='-stdlib=libc++ -I/usr/local/include/c++/v1'
> ...
>> SUCCESS!
> 
> I experienced similar success with a similar, though simpler, command
> line, but on further experimentation it turns out that the CXXFLAGS
> passed to configure weren't then used in the build itself. (you can
> confirm this by adding some broken STL usage to any of the LLVM code -
> I used "std::copy(1, 2, 3)"). If the compilation error points to
> libc++ headers, you win, if not - you're in the same state I was.
> 
> To get LLVM to actually build with libc++ at least as an experiment, I
> tried passing the same CXXFLAGS to the make command itself - this hit
> the libc++abi issue that Ryuta mentioned.
> 
> I haven't tried building/using libc++abi as yet - I checked it out but
> didn't find any build steps, Makefiles, etc. The website has no howto.
> I assume it's just not finished/mature enough yet.

libc++abi is not yet usable. It lacks a lots of required functions:

http://libcxxabi.llvm.org/spec.html

-- Jean-Daniel








More information about the cfe-dev mailing list