[LLVMdev] Purpose of LLVM_ENABLE_LIBCXX and LLVM_ENABLE_LIBCXXABI

Schlottke-Lakemper, Michael m.schlottke-lakemper at aia.rwth-aachen.de
Tue Jul 28 08:51:00 PDT 2015


Hi Renato,

>> Related to the first question: do the above flags also make clang use libc++ by default, or is this configurable via a different set of flags?
> 
> No. I believe this is an old flag when that wasn't enable by default
> (and now it's used to disable it if you have the dirs). But maybe
> heavier users of libc++ can help you there.
> 
> You still have to use LDFLAGS="--stdlib=libc++ -lc++abi -lunwind" and,
> if you're not installing it anywhere (but using the build directory),
> add LD_LIBRARY_PATH=build/lib to your environment.
> 
> If you run into inconsistencies because libgcc_s / libgcc_eh are
> included, or if libstdc++ is included as well, you may have to use
> -nostdlibc++ to clean up the internal options, and then use --stdlib
> and friends to create a new set.
Thanks for the clarification and the hint with -nostdlibc++.

Michael



More information about the llvm-dev mailing list