[libc++] Don't manually override NDEBUG in the dylib build
authorLouis Dionne <ldionne.2@gmail.com>
Tue, 8 Mar 2022 20:13:24 +0000 (15:13 -0500)
committerLouis Dionne <ldionne.2@gmail.com>
Wed, 9 Mar 2022 15:05:38 +0000 (10:05 -0500)
commit0f622bd281bda627cb988024bb1d86768d411e01
treeee60a4c115b8cfc5524ab4f5a334d86978f20b72
parent7c385c4b2f653d6853fe4601f02bbc7fcd60cd91
[libc++] Don't manually override NDEBUG in the dylib build

LIBCXX_ENABLE_ASSERTIONS does not have any relationship to the `assert`
macro -- it only controls assertions that are internal to the library.
Playing around with `NDEBUG` only muddies the picture further than it
already is.

Also, remove a failing assertion in the benchmarks. That assertion had
never been exercised because we defined `NDEBUG` manually, and it was
failing since we introduced the ability to generate a benchmark vector
with the Quicksort adversary ordering (which is obviously not sorted).

This was split off of https://llvm.org/D121123.

Differential Revision: https://reviews.llvm.org/D121244
libcxx/CMakeLists.txt
libcxx/benchmarks/algorithms.bench.cpp