Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
580 views
in Technique[技术] by (71.8m points)

clang - Does libcxxabi makes sense under linux? What are the benefits?

I'm trying to determine if building and using libcxxabi from the llvm project under linux makes sense.

My build of libcxxabi is linked to

ldd libc++abi.so.1.0 
    linux-vdso.so.1 =>  (0x00007fff2e0db000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd658f0d000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd658d05000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd65893c000)
    libc++.so.1 => /path/where/clang/is // edited
    /lib64/ld-linux-x86-64.so.2 (0x00007fd6593ab000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd658465000)

and so it's using the gcc_s library, the GNU librt, and the only real difference is the fact that it's using libc++ over libstdc++, but how good this really is ?

Given the critical role of an abi library, I should go for libcxxabi under such platform ?

My problem it's not about how to build this, or if this will work, but if this is a good idea C++-wise, what kind of benefits I can possibly get, or what kind of benefits you are getting if you are already using this.

question from:https://stackoverflow.com/questions/22509711/does-libcxxabi-makes-sense-under-linux-what-are-the-benefits

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should not use libcxxabi directly. To my understanding it is a kind of platform abstraction library, providing low level functions needed to implement libcxx.

If you are asking about using libcxx or libstdc++, the differences are mostly the license, newer standard version completeness (the clang project seems slightly faster in implementing recent C++ revisions) and the fact that you have two alternative implementations.

There seems no pressing reason for one of those above the other. I would stick to the one that is better supported on your system. Both projects aim at being ABI compatible, so it should be possible to use either without any breakage.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...