[cfe-dev] Compiling libcxx without changes to the system dirs

Ashok Nalkund ashoknn at qualcomm.com
Thu Jun 14 15:48:19 PDT 2012


Hi All,
   I'm trying to replace libstdc++ with libcxx in our project. I read 
the instructions provided at libcxx home page.
   I found that I dont need to copy the headers (cxxabi.h, 
bits/cxxabi_tweaks.h, cxxabi-forced.h) from /usr/include/c++/4.5/... to 
/usr/local/include/... . I copied the files to a folder and included 
that in the compilation of the libcxx sources.
   I also found that I didnt need to copy the libc++.so* to /usr/lib, I 
didnt need to create the /usr/include/c++/v1 softlink pointing to 
libcxx/include. I got around by including the libcxx/include in the 
header path (-I..libcxx/include) and libcxx/lib path in the lib path 
(-L...libcxx/lib).

   I had to set HEADER_INCLUDE=...libcxx/include and 
SOURCE_LIB=...libcxx/lib before invoking testit.This way I got around 
making any changes to the system dirs to use libcxx.

   Do you see any obvious mistakes above?

TIA,
Ashok



More information about the cfe-dev mailing list