[libcxx-commits] [libcxx] [llvm] [libcxx][CMake] Rework LLVM_ENABLE_ASSERTIONS interaction w. libcxx hardening (PR #229359)
Steven Wu via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 7 08:18:24 PDT 2026
cachemeifyoucan wrote:
> Would be okay with a patch that removes the LIBCXX_HARDENING_MODE=auto handling, essentially removing the implied LLVM_ENABLE_ASSERTIONS=ON -> LIBCXX_HARDENING_MODE=extensive link?
ABSOLUTELY NOT. LLVM_ENABLE_ASSERTIONS=ON has to imply using LIBCXX_HARDENING_MODE=extensive with libcxx header. That matches the behavior of using libstdc++ and is essential for catching mis-use of std containers.
> I would like to slightly push back against this.
What I am really against is that you are doing it in an ambiguous way making the configuration more confusing. Someone can easily come tomorrow and want to build header with fast and library with extensive and there is no way to extend your solution to cover that. The other two points I made are simply saying where we are right now is not a bad place to be.
If you really want to improve the build, you need to separate the configuration for the user of libcxx header and the configuration for building libcxx when everything is configured together.
https://github.com/llvm/llvm-project/pull/229359
More information about the libcxx-commits
mailing list