Skip to content

Commit f922462

Browse files
author
git apple-llvm automerger
committed
Merge commit '3290ca0fdd69' from llvm.org/release/21.x into stable/21.x
2 parents ef6bc7b + 3290ca0 commit f922462

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

libcxx/include/__config

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,21 @@
6464

6565
// HARDENING {
6666

67-
// TODO: Remove in LLVM 21. We're making this an error to catch folks who might not have migrated.
68-
# ifdef _LIBCPP_ENABLE_ASSERTIONS
69-
# error "_LIBCPP_ENABLE_ASSERTIONS has been removed, please use _LIBCPP_HARDENING_MODE instead"
67+
// TODO(LLVM 23): Remove this. We're making these an error to catch folks who might not have migrated.
68+
// Since hardening went through several changes (many of which impacted user-facing macros),
69+
// we're keeping these checks around for a bit longer than usual. Failure to properly configure
70+
// hardening results in checks being dropped silently, which is a pretty big deal.
71+
# if defined(_LIBCPP_ENABLE_ASSERTIONS)
72+
# error "_LIBCPP_ENABLE_ASSERTIONS has been removed, please use _LIBCPP_HARDENING_MODE=<mode> instead (see docs)"
73+
# endif
74+
# if defined(_LIBCPP_ENABLE_HARDENED_MODE)
75+
# error "_LIBCPP_ENABLE_HARDENED_MODE has been removed, please use _LIBCPP_HARDENING_MODE=<mode> instead (see docs)"
76+
# endif
77+
# if defined(_LIBCPP_ENABLE_SAFE_MODE)
78+
# error "_LIBCPP_ENABLE_SAFE_MODE has been removed, please use _LIBCPP_HARDENING_MODE=<mode> instead (see docs)"
79+
# endif
80+
# if defined(_LIBCPP_ENABLE_DEBUG_MODE)
81+
# error "_LIBCPP_ENABLE_DEBUG_MODE has been removed, please use _LIBCPP_HARDENING_MODE=<mode> instead (see docs)"
7082
# endif
7183

7284
// The library provides the macro `_LIBCPP_HARDENING_MODE` which can be set to one of the following values:

0 commit comments

Comments
 (0)