[libcxx-commits] [libcxxabi] [libc++] Bump the C++ Standard used to compile the dylib to C++23 (PR #66824)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 11 11:04:36 PDT 2023


================
@@ -37,7 +37,7 @@ set(Clang_DIR "${Clang_DIR_SAVE}" CACHE PATH "The directory containing a CMake c
 
 message(STATUS "Found system-installed LLVM ${LLVM_PACKAGE_VERSION} with headers in ${LLVM_INCLUDE_DIRS}")
 
-set(CMAKE_CXX_STANDARD 20)
+set(CMAKE_CXX_STANDARD 23)
----------------
mordante wrote:

Using environment variables has no effect. 
Looking at the compilation command for the clang-tidy plugin the command used is
```
ccache /usr/lib/llvm-18/bin/clang++ -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -Dcxx_tidy_EXPORTS -isystem /usr/lib/llvm-17/include -fvisibility-inlines-hidden
-Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings
-Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type
-Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++20
-fPIC -fno-rtti -fno-sanitize=address,hwaddress,undefined,thread,leak -fno-sanitize=memory,dataflow
-MD -MT libcxx/test/tools/clang_tidy_checks/CMakeFiles/cxx-tidy.dir/header_exportable_declarations.cpp.o
-MF libcxx/test/tools/clang_tidy_checks/CMakeFiles/cxx-tidy.dir/header_exportable_declarations.cpp.o.d
-o libcxx/test/tools/clang_tidy_checks/CMakeFiles/cxx-tidy.dir/header_exportable_declarations.cpp.o
-c /data/src/llvm/libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp
```
I see nowhere that it tries to use the built libc++, instead it uses the system library.

https://github.com/llvm/llvm-project/pull/66824


More information about the libcxx-commits mailing list