[libcxx] r286784 - Add docs for use-configurable libc++ features

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 13 15:00:30 PST 2016


Author: ericwf
Date: Sun Nov 13 17:00:30 2016
New Revision: 286784

URL: http://llvm.org/viewvc/llvm-project?rev=286784&view=rev
Log:
Add docs for use-configurable libc++ features

Modified:
    libcxx/trunk/docs/UsingLibcxx.rst

Modified: libcxx/trunk/docs/UsingLibcxx.rst
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/docs/UsingLibcxx.rst?rev=286784&r1=286783&r2=286784&view=diff
==============================================================================
--- libcxx/trunk/docs/UsingLibcxx.rst (original)
+++ libcxx/trunk/docs/UsingLibcxx.rst Sun Nov 13 17:00:30 2016
@@ -123,3 +123,29 @@ supported by libc++ they may be useful t
 Known 3rd Party Implementations Include:
 
 * `Koutheir's libc++ pretty-printers <https://github.com/koutheir/libcxx-pretty-printers>`_.
+
+
+Libc++ Configuration Macros
+===========================
+
+Libc++ provides a number of configuration macros which can be used to enable
+or disable extended libc++ behavior, including enabling "debug mode" or
+thread safety annotations.
+
+**_LIBCPP_DEBUG**:
+  This macro is used to enable assertions and other debugging checks within
+  libc++. All debugging checks are disabled by default.
+
+  **Values**: ``0``, ``1``
+
+  Defining ``_LIBCPP_DEBUG`` to ``0`` or greater enables most of libc++'s
+  assertions. Defining ``_LIBCPP_DEBUG`` to ``1`` enables "iterator debugging"
+  which provides additional assertions about the validity of iterators used by
+  the program.
+
+  Note that this option has no effect on libc++'s ABI
+
+**_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS**:
+  This macro is used to enable -Wthread-safety annotations on libc++'s
+  ``std::mutex`` and ``std::lock_guard``. By default these annotations are
+  disabled and must be manually enabled by the user.




More information about the cfe-commits mailing list