[cfe-dev] How to build both static and shared libs for libc++?

Zack Perry zack.perry at sbcglobal.net
Sat Apr 6 00:19:56 PDT 2013


Hi Charlies,

I didn't wish to be defeated so easily, so this evening, I studied more CMake/CPack online resources, and enhanced the libc++ bundled CMakeLists.txt some more with an add_library, a set_target_properties, and an install commands, I got both static and shared libs built and packaged as a libcxx-3.3.svn-0.el6.x86_64.rpm

$ rpm -qlp libcxx-3.3.svn-0.el6.x86_64.rpm |grep libc++
/usr/lib/libc++.a
/usr/lib/libc++.so
/usr/lib/libc++.so.1
/usr/lib/libc++.so.1.0

Once and for all. Mission accomplished 8-)

Regards,

Zack

> [...]
>> >
> I don't think the CMake files in libc++ are set up to build
> both shared and static at the same time. For now, you'll
> have to build twice: once shared, and once static. (Someone
> should really fix that. :)
> 
> Chip
> 
[...]





More information about the cfe-dev mailing list