[libc++] Fix documentation for setting hardening ABI macros#121946
Merged
ldionne merged 1 commit intoJan 7, 2025
Conversation
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 #bitcoin/bitcoin#31612.
Member
|
@llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) ChangesThe 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 #bitcoin/bitcoin#31612. Full diff: https://github.com/llvm/llvm-project/pull/121946.diff 1 Files Affected:
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
|
vasild
approved these changes
Jan 7, 2025
vasild
left a comment
There was a problem hiding this comment.
LGTM 180dd2a
Following these instructions resolved the issue in bitcoin/bitcoin#31612
nit: while here maybe drop the extra trailing ` a bunch of lines below in:
``_LIBCPP_ABI_BOUNDED_UNIQUE_PTR```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 #bitcoin/bitcoin#31612.