[libcxx-commits] [libcxx] [libc++] Build the library with C++26 (PR #181021)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 25 05:23:15 PST 2026
================
@@ -504,11 +504,9 @@ remove_flags(-Wno-pedantic -pedantic-errors -pedantic)
# Required flags ==============================================================
function(cxx_add_basic_build_flags target)
- # Use C++23 for all targets.
- set_target_properties(${target} PROPERTIES
- CXX_STANDARD 23
- CXX_STANDARD_REQUIRED OFF # TODO: Make this REQUIRED once we don't need to accommodate the LLVM documentation builders using an ancient CMake
- CXX_EXTENSIONS NO)
+ # Use C++26 for all targets. Note that we don't use CXX_STANDARD or cxx_std_foo
+ # since that requires a newer CMake than is available.
+ target_compile_options(${target} PRIVATE $<IF:$<CXX_COMPILER_ID:MSVC>,/std:c++26,-std=c++26>)
----------------
ldionne wrote:
The goal here was indeed to support clang-cl, which we are using on some of the CI bots. I'll switch to `/std:c++latest`.
https://github.com/llvm/llvm-project/pull/181021
More information about the libcxx-commits
mailing list