ClickHouse/cmake
Robert Schulze b9b7a1091b
(Re)-enable libcxx debug mode
- We previously compiled libcxx with _LIBCPP_DEBUG=0. In old libcxx
  versions, this (surprisingly) enabled the basic debug mode [1].

- In libcxx 15 (the version we are currently using), _LIBCPP_DEBUG=0
  does nothing [2], the replacement is _LIBCPP_ENABLE_DEBUG_MODE=1.

- The debug mode is only enabled in Debug builds. Their docs say the
  extra check change complexity guarantees + the asserts crash which we
  don't want in Release builds. The debug mode detects issues like in
  [3]. Crashes look like this (for example)

  ```
  /data/ch/contrib/llvm-project/libcxx/include/__iterator/wrap_iter.h:99: assertion ::std::__libcpp_is_constant_evaluated() || (__get_const_db()->__dereferenceable(this)) failed: Attempted to increment a non-incrementable iteratorAborted (core dumped)
  ```

- I had to mute some new clang-tidy warnings in places that deal with
  container iterators. They got heavier and copy-by-value now yields a
  warning, e.g.

     for (auto it : iterators) /// <-- warning
         [...]

[1] https://releases.llvm.org/12.0.0/projects/libcxx/docs/DesignDocs/DebugMode.html
[2] https://releases.llvm.org/15.0.0/projects/libcxx/docs/DesignDocs/DebugMode.html
[3] https://github.com/llvm/llvm-project/blob/main/libcxx/test/support/container_debug_tests.h
2024-10-15 13:46:07 +00:00
..
darwin Remove garbage 2023-11-20 01:24:28 +01:00
freebsd Fix FreeBSD build 2024-08-24 16:01:03 +02:00
linux Revert "Revert "Merge pull request #63279 from allmazz/mongodb_refactoring"" 2024-09-23 07:06:58 +00:00
toolchain 1. skip extract darwin toolchain in builder when uncessary 2023-06-04 23:06:21 +08:00
add_warning.cmake Do not build protobuf twice 2021-11-25 01:50:54 +03:00
arch.cmake Initial support for loongarch64 2024-05-14 07:45:26 +00:00
autogenerated_versions.txt Update autogenerated version to 24.10.1.1 and contributors 2024-09-20 10:27:17 +00:00
ccache.cmake Prefer sccache to ccache by default 2023-11-19 23:11:05 +01:00
check_flags.cmake Remove cruft from build 2023-03-17 13:44:04 +00:00
clang_tidy.cmake Fix clang-tidy 2024-03-13 09:39:03 +01:00
cpu_features.cmake Docs: Follow-up for #70585 2024-10-14 19:02:09 +00:00
cxx.cmake (Re)-enable libcxx debug mode 2024-10-15 13:46:07 +00:00
dbms_glob_sources.cmake Remove dbms dependency on clickhouse_functions 2024-09-24 19:48:23 +02:00
git.cmake Use PROJECT_*_DIR instead of CMAKE_*_DIR. 2023-05-18 23:23:39 +08:00
limit_jobs.cmake revert hacks made to prevent OOM in aarch64 2024-08-17 18:53:43 +02:00
print_flags.cmake Use PROJECT_*_DIR instead of CMAKE_*_DIR. 2023-05-18 23:23:39 +08:00
sanitize_targets.cmake Sanitize thirdparty libraries for public flags 2022-11-16 07:20:24 +01:00
sanitize.cmake cherry on top of this cake 2024-07-27 21:24:13 +01:00
split_debug_symbols.cmake Publish stripped binary 2023-11-11 07:27:10 +01:00
target.cmake Yarrrr 2024-07-05 16:31:00 +02:00
tools.cmake Make it better 2024-10-06 02:09:30 +08:00
unwind.cmake Force libunwind usage (removes gcc_eh support) 2023-07-08 20:55:50 +02:00
utils.cmake Avoid ignoring errors of execute_process() (set COMMAND_ERROR_IS_FATAL=ANY) 2024-08-13 10:35:54 +02:00
version.cmake Use PROJECT_*_DIR instead of CMAKE_*_DIR. 2023-05-18 23:23:39 +08:00
warnings.cmake Remove leftovers of GCC support in cmake rules 2024-05-07 21:07:02 +02:00
xray_instrumentation.cmake xray: rename cmake file and build only on amd64 linux 2024-06-05 12:40:18 +03:00