What is the difference between libc++ and libc++abi library in LLVM?
Asked Answered
M

1

23

I saw the two projects are quite related, but what are the differences between them? The official webpage doesn't tell much about it.

I know that ABI (Application Binary Interface) is used to provide low-level binary interface among different platforms. So is libc++abi used to provide different implementations for different platforms, and general interface for libc++?

Would be better go give some specific example, e.g. what are included in libc++abi and what in libc++.

Thanks.

Mistrust answered 25/7, 2017 at 21:56 Comment(0)
D
8

The Application Binary Interface, or ABI for short, is intended to provide certain low level functions from which to build the C++ standard library. It is a supporting library that is a separate component from the actual standard library. Along with libcxxabi, you may also come across Pathscale's libcxxrt or GCC's libsupcxx.

On the other hand, libc++ is an implementation of the C++ standard library that can be built using either of the 3 mentioned ABIs.

Donnelly answered 25/7, 2017 at 22:27 Comment(2)
Thanks a lot! So do you mean libcxxabi, libcxxrt, libsupcxx, libc++abi, they are similar and all provide the ABI implementations? And could you give some specific examples, what are in libc++abi and what are in libc++?Mistrust
libcxxabi and libc++abi are the same thing. The ABI libraries contain support for memory management, exception handling, etc... You can see what libcxxabi offers. libc++ contains the actual C++ standard library.Donnelly

© 2022 - 2024 — McMap. All rights reserved.