2011-05-05 23:27:28 +08:00
< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
< html >
< head >
< META http-equiv = "Content-Type" content = "text/html; charset=ISO-8859-1" >
< title > "libc++abi" C++ Standard Library Support< / title >
< link type = "text/css" rel = "stylesheet" href = "menu.css" >
< link type = "text/css" rel = "stylesheet" href = "content.css" >
< / head >
< body >
< div id = "menu" >
< div >
< a href = "http://llvm.org/" > LLVM Home< / a >
< / div >
< div class = "submenu" >
< label > libc++abi Info< / label >
< a href = "/index.html" > About< / a >
< / div >
< div class = "submenu" >
< label > Quick Links< / label >
2018-09-20 16:01:16 +08:00
< a href = "https://libcxx.llvm.org/" > libc++< / a >
2018-09-23 03:52:12 +08:00
< a href = "http://lists.llvm.org/mailman/listinfo/libcxx-dev" > libcxx-dev< / a >
< a href = "http://lists.llvm.org/mailman/listinfo/libcxx-commits" > libcxx-commits< / a >
2011-05-05 23:27:28 +08:00
< a href = "http://llvm.org/bugs/" > Bug Reports< / a >
2019-01-30 00:37:27 +08:00
< a href = "https://github.com/llvm/llvm-project/tree/master/libcxxabi/" > Browse Sources< / a >
2011-05-05 23:27:28 +08:00
< / div >
< / div >
< div id = "content" >
<!-- ********************************************************************* -->
< h1 > "libc++abi" C++ Standard Library Support< / h1 >
<!-- ********************************************************************* -->
< p > libc++abi is a new implementation of low level support for a standard
C++ library.< / p >
< p > All of the code in libc++abi is < a
href="http://llvm.org/docs/DeveloperPolicy.html#license">dual licensed< / a >
under the MIT license and the UIUC License (a BSD-like license).< / p >
<!-- ===================================================================== -->
< h2 id = "goals" > Features and Goals< / h2 >
<!-- ===================================================================== -->
< ul >
< li > Correctness as defined by the C++11 standard.< / li >
2012-07-21 01:21:42 +08:00
< li > Provide a portable sublayer to ease the porting of < a href = "http://libcxx.llvm.org/" > libc++< / a > < / li >
2011-05-20 07:38:38 +08:00
< li > On Mac OS X, be ABI compatible with the existing low-level support.< / li >
2011-05-05 23:27:28 +08:00
< / ul >
<!-- ===================================================================== -->
< h2 id = "requirements" > Platform Support< / h2 >
<!-- ===================================================================== -->
< p > libc++abi is known to work on the following platforms, using clang.< / p >
< ul >
2012-08-03 06:06:41 +08:00
< li > Darwin< / li >
2011-05-05 23:27:28 +08:00
< / ul >
<!-- ===================================================================== -->
< h2 id = "dir-structure" > Current Status< / h2 >
<!-- ===================================================================== -->
2012-08-03 06:06:41 +08:00
< p > libc++abi is complete. < a href = "spec.html" > Here< / a > is a
list of functionality.< / p >
2011-05-05 23:27:28 +08:00
<!-- ===================================================================== -->
< h2 > Get it and get involved!< / h2 >
<!-- ===================================================================== -->
2019-01-30 00:37:27 +08:00
< p > To check out the code (including llvm and others), use:< / p >
2011-05-05 23:27:28 +08:00
< ul >
2019-01-30 00:37:27 +08:00
< li > < code > git clone https://github.com/llvm/llvm-project.git< / code > < / li >
2011-05-05 23:27:28 +08:00
< / ul >
2014-07-04 03:35:48 +08:00
< p > To build:< / p >
< ul >
2019-01-30 00:37:27 +08:00
< li > < code > cd llvm-project< / code > < / li >
2014-07-04 03:35:48 +08:00
< li > < code > mkdir build & & cd build< / code > < / li >
2019-01-30 00:37:27 +08:00
< li > < code > cmake -DLLVM_ENABLE_PROJECTS=libcxxabi ../llvm # on linux you may need to specify -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++< / code > < / li >
2014-07-04 03:35:48 +08:00
< li > < code > make< / code > < / li >
< / ul >
< p > To do a standalone build:< / p >
< ul >
2015-01-23 04:00:06 +08:00
< li >
2019-01-30 00:37:27 +08:00
Check out the source tree. This includes the other subprojects, but you'll only use the libcxxabi part.
2015-01-23 04:00:06 +08:00
< / li >
2019-01-30 00:37:27 +08:00
< li > < code > cd llvm-project< / code > < / li >
< li > < code > mkdir build-libcxxabi & & cd build-libcxxabi< / code > < / li >
< li > < code > cmake -DLIBCXXABI_LIBCXX_PATH=path/to/libcxx ../libcxxabi # on
2014-07-10 10:20:11 +08:00
linux you may need -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++< / code > < / li >
2014-07-04 03:35:48 +08:00
< li > < code > make< / code > < / li >
< / ul >
2014-10-18 00:32:06 +08:00
< p > By default CMake uses < code > llvm-config< / code > to locate the required
LLVM sources. If CMake cannot find < code > llvm-config< / code > then you must
configure CMake using either of the following options.
< / p >
< ul >
2016-08-29 02:16:18 +08:00
< li > < code > -DLLVM_CONFIG_PATH=path/to/llvm-config< / code > < / li >
2014-10-18 00:32:06 +08:00
< li > < code > -DLLVM_PATH=path/to/llvm-source-root< / code > < / li >
< / ul >
< / p >
2014-07-04 03:35:48 +08:00
2014-07-10 10:20:11 +08:00
< p > To run the tests:< / p >
< ul >
2016-08-29 02:28:51 +08:00
< li > < code > make check-cxxabi< / code > < / li >
2014-07-10 10:20:11 +08:00
< / ul >
< p > Note: in a standalone build, the system's libc++ will be used for tests. If
the system's libc++ was statically linked against libc++abi (or linked against
a different ABI library), this may interfere with test results.< / p >
2011-05-05 23:27:28 +08:00
< p > Send discussions to the
2018-09-23 03:52:12 +08:00
(< a href = "http://lists.llvm.org/mailman/listinfo/libcxx-dev" > libcxx-dev mailing list< / a > ).< / p >
2011-05-05 23:27:28 +08:00
2014-06-12 00:54:09 +08:00
<!-- ===================================================================== -->
< h2 > Frequently asked questions< / h2 >
<!-- ===================================================================== -->
< p > Q: Why are the destructors for the standard exception classes defined in libc++abi?
They're just empty, can't they be defined inline?< / p >
< p > A: The destructors for them live in libc++abi because they are "key" functions.
The Itanium ABI describes a "key" function as the first virtual declared.
And wherever the key function is defined, that is where the < code > type_info< / code > gets defined.
And in libc++ types are the same type if and only if they have the same < code > type_info< / code >
(as in there must be only one type info per type in the entire application).
And on OS X, libstdc++ and libc++ share these exception types.
So to be able to throw in one dylib and catch in another (a < code > std::exception< / code > for example),
there must be only one < code > std::exception type_info< / code > in the entire app.
That typeinfo gets laid down beside < code > ~exception()< / code > in libc++abi (for both libstdc++ and libc++).< / p >
< p > --Howard Hinnant< / p >
2011-05-05 23:27:28 +08:00
< / div >
< / body >
< / html >