• Marko Mäkelä's avatar
    MDEV-33974 Enable GNU libstdc++ debugging · a1c1f502
    Marko Mäkelä authored
    Starting with GCC 10, let us enable _GLIBCXX_DEBUG as well as
    _GLIBCXX_ASSERTIONS which have an impact on the GNU libstdc++.
    On GCC 8, we observed a compilation failure related to some
    missing type conversion.
    
    Even though clang on GNU/Linux would default to using libstdc++
    and enabling the debugging seems to work with clang-18, we will
    not enable this on clang, in case it would lead to compilation
    errors.
    
    For the clang libc++ before clang-15 there was _LIBCPP_DEBUG,
    but according to
    llvm/llvm-project@f3966eaf869b7bdd9113ab9d5b78469eb0f5f028 and
    llvm/llvm-project@13ea1343231fa4ae12fe9fba4c789728465783d7 and
    llvm/llvm-project@ff573a42cd1f1d05508f165dc3e645a0ec17edb5 it
    looks like that for proper results, a specially built debug version
    of libc++ would have to be used in order to enable equivalent checks.
    
    This should help catch bugs like the one that
    commit 455a15fd fixed.
    
    Reviewed by: Sergei Golubchik
    a1c1f502
CMakeLists.txt 20.8 KB