forked from continuwuation/rocksdb
Summary: A follow-up to https://github.com/facebook/rocksdb/issues/13904 which was incomplete in updating CI jobs to support C++20 because the C++20 usage was only in tests. Here we add subtle C++20 usage in the public API ("using enum" feature in db.h) to force the issue. A lot of the work for this PR was in updating the Ubuntu22 docker image, for earlier compiler/runtime versions supporting C++20, and generating a new Ubuntu24 docker image, for later compiler/runtime versions. The Ubuntu22 image needed to be updated because there are incompatibilities with clang-13 + c++20 + libstdc++ for gcc 11, seen on these examples ``` #include <chrono> int main(int argc, char *argv[]) { std::chrono::microseconds d = {}; return 0; } ``` and ``` #include <coroutine> int main() { return 0; } ``` The second was causing recurring failures in build-linux-clang-13-asan-ubsan-with-folly, now fixed. So we have to install clang's libc++ to compile with clang-13. I haven't been able to get this to work with some of the libraries like benchmark, glog, and/or gflags, but I'm able to compile core RocksDB with clang-13. On this docker image, an extra compiler parameter is needed to compile with gcc and glog because it's built from source perhaps not perfectly, because the ubuntu package transitively conflicts with libc++. The Ubuntu24 image seems to be low-drama and generally work for testing out newer compiler versions. The mingw build uses Ubuntu24 because the mingw package on Ubuntu22 uses a gcc version that is too old. And the mass of other code changes are trying to work around new warnings, mostly from clang-analyze, which I upgraded to clang-18 in CI. Pull Request resolved: https://github.com/facebook/rocksdb/pull/13915 Test Plan: CI, including temporarily including the nightly jobs in the PR jobs in earlier revisions to test and stabilize Reviewed By: archang19 Differential Revision: D81933067 Pulled By: pdillinger fbshipit-source-id: 7e33823006a79d5f3cf5bc1d625f0a3c08a7d74c |
||
|---|---|---|
| .. | ||
| block_cache_tier.cc | ||
| block_cache_tier.h | ||
| block_cache_tier_file.cc | ||
| block_cache_tier_file.h | ||
| block_cache_tier_file_buffer.h | ||
| block_cache_tier_metadata.cc | ||
| block_cache_tier_metadata.h | ||
| hash_table.h | ||
| hash_table_bench.cc | ||
| hash_table_evictable.h | ||
| hash_table_test.cc | ||
| lrulist.h | ||
| persistent_cache_bench.cc | ||
| persistent_cache_test.cc | ||
| persistent_cache_test.h | ||
| persistent_cache_tier.cc | ||
| persistent_cache_tier.h | ||
| persistent_cache_util.h | ||
| volatile_tier_impl.cc | ||
| volatile_tier_impl.h | ||