Enable more hardening for libcpp
-
_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS
: This macro is used to enable-Wthread-safety
annotations on libc++’sstd::mutex
andstd::lock_guard
. -
_LIBCPP_ENABLE_HARDENED_MODE
to enable the hardened mode:The hardened mode enables a set of security-critical assertions that prevent undefined behavior caused by violating preconditions of the standard library. These assertions can be done with relatively little overhead in constant time and are intended to be used in production.
Edited by jvoisin