[libcxx-commits] [libcxx] [libc++][hardening] Check that `_LIBCPP_HARDENING_MODE_DEFAULT` is defined (PR #80353)
Konstantin Varlamov via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 1 14:14:10 PST 2024
================
@@ -325,6 +325,11 @@
// clang-format on
# ifndef _LIBCPP_HARDENING_MODE
+
+# ifndef _LIBCPP_HARDENING_MODE_DEFAULT
+# error _LIBCPP_HARDENING_MODE_DEFAULT is not defined.
----------------
var-const wrote:
Do we want to speculate in the comment as to why that might be the case? E.g.
```cpp
// Normally this macro comes from the `__config_site` header which is generated via CMake.
// If you use a custom build system, please make sure to define `_LIBCPP_HARDENING_MODE_DEFAULT`
// to one of the valid hardening modes.
```
https://github.com/llvm/llvm-project/pull/80353
More information about the libcxx-commits
mailing list