[libcxx-commits] [libcxx] [libc++] Fix documentation for setting hardening ABI macros (PR #121946)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 7 06:48:50 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

<details>
<summary>Changes</summary>

The documentation was misleading, suggesting that people could simply define these macros, when in reality they must be passed at CMake configuration time in a very specific way.

This was reported in #https://github.com/bitcoin/bitcoin/pull/31612.

---
Full diff: https://github.com/llvm/llvm-project/pull/121946.diff


1 Files Affected:

- (modified) libcxx/docs/Hardening.rst (+4-1) 


``````````diff
diff --git a/libcxx/docs/Hardening.rst b/libcxx/docs/Hardening.rst
index 531065afb8e82b..01236a356ae9e9 100644
--- a/libcxx/docs/Hardening.rst
+++ b/libcxx/docs/Hardening.rst
@@ -311,7 +311,10 @@ ABI configuration.
 ABI options
 -----------
 
-Vendors can use the following ABI options to enable additional hardening checks:
+Vendors can use some ABI options at CMake configuration time (when building libc++
+itself) to enable additional hardening checks. This is done by passing these
+macros as ``-DLIBCXX_ABI_DEFINES="_LIBCPP_ABI_FOO;_LIBCPP_ABI_BAR;etc"`` at
+CMake configuration time. The available options are:
 
 - ``_LIBCPP_ABI_BOUNDED_ITERATORS`` -- changes the iterator type of select
   containers (see below) to a bounded iterator that keeps track of whether it's

``````````

</details>


https://github.com/llvm/llvm-project/pull/121946


More information about the libcxx-commits mailing list