For Clang, we now pass -D_GLIBCXX_DEBUG=1 if debugstl is enabled, and we also pass -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG. Per https://discourse.llvm.org/t/building-a-program-with-d-libcpp-debug-1-against-a-libc-that-is-not-itself-built-with-that-define/59176/3, we can't use _LIBCPP_DEBUG for older Clang versions as it's unreliable unless libc++ was built with it. We choose MODE_DEBUG for stldebug while building with assertions will do MODE_EXTENSIVE. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>pull/12684/head
parent
ce2db13e94
commit
a5fdd3771f
2 changed files with 17 additions and 0 deletions
@ -0,0 +1,4 @@ |
||||
## `stldebug` gains Clang support |
||||
|
||||
For Clang, we now pass `-D_GLIBCXX_DEBUG=1` if `debugstl` is enabled, and |
||||
we also pass `-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG`. |
Loading…
Reference in new issue