From 180dd2a27fa30f4f2cb7ffc2c26d3483195f1f85 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 7 Jan 2025 09:45:51 -0500 Subject: [PATCH] [libc++] Fix documentation for setting hardening ABI macros 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. --- libcxx/docs/Hardening.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcxx/docs/Hardening.rst b/libcxx/docs/Hardening.rst index 531065afb8e82..01236a356ae9e 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