diff options
| author | Sam James <sam@gentoo.org> | 2024-01-02 03:03:57 +0000 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2024-01-09 20:49:27 -0500 |
| commit | a5fdd3771f8ec510167d44ef43cda1285ee05610 (patch) | |
| tree | 2ec0b526ba5b0d90126a1e7d5f30d1a1be5e79ce /docs | |
| parent | ce2db13e94fdeaff72d9e1f23b40072f9fb8818b (diff) | |
| download | meson-a5fdd3771f8ec510167d44ef43cda1285ee05610.tar.gz | |
compilers: cpp: wire up debugstl for Clang
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>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/markdown/snippets/cpp-stldebug.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/markdown/snippets/cpp-stldebug.md b/docs/markdown/snippets/cpp-stldebug.md new file mode 100644 index 000000000..ba0473608 --- /dev/null +++ b/docs/markdown/snippets/cpp-stldebug.md @@ -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`. |
