[PATCH] D142279: [cmake] Use LLVM_ENABLE_ASSERTIONS to enable assertions in libstdc++

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 21 08:03:43 PST 2023


barannikov88 added a comment.

In D142279#4071142 <https://reviews.llvm.org/D142279#4071142>, @nikic wrote:

> Ah no, having looked a bit closer, I think we want to have `-D_GLIBCXX_ASSERTIONS` in normal assertion enabled builds and `-DGLIBCXX_DEBUG` only under EXPENSIVE_CHECKS, so I think your implementation is about right as-is.

We already have this define under expensive checks. There are bots that define this macro, and the build stays clean (mostly, as pre-merge checks have shown).
We have been using STL for many years without the additional assertions, and I don't see why we should change it now. Those few failures is not enough motivation to slow down debug builds even further.
I'd be convinced though if someone could measure check-llvm-codegen time with and without this macro and show that the difference is negligible.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142279/new/

https://reviews.llvm.org/D142279



More information about the llvm-commits mailing list