diff --git a/libcxx/cmake/caches/Generic-cxx26.cmake b/libcxx/cmake/caches/Generic-cxx26.cmake --- a/libcxx/cmake/caches/Generic-cxx26.cmake +++ b/libcxx/cmake/caches/Generic-cxx26.cmake @@ -1,2 +1,3 @@ +set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically. set(LIBCXX_TEST_PARAMS "std=c++26" CACHE STRING "") set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "") diff --git a/libcxx/docs/Modules.rst b/libcxx/docs/Modules.rst --- a/libcxx/docs/Modules.rst +++ b/libcxx/docs/Modules.rst @@ -49,12 +49,13 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * There is no official build system support, libc++ has experimental CMake support - * Requires CMake 3.26 + * Requires CMake 3.26 for C++23 support + * Requires CMake 3.27 for C++26 support * Requires Ninja 1.11 * Requires a recent Clang 17 * The path to the compiler may not be a symlink, ``clang-scan-deps`` does not handle that case properly - * Only C++23 is tested + * Only C++23 and C++26 are tested * Libc++ is not tested with modules instead of headers * The module ``.cppm`` files are not installed * The experimental ``PSTL`` library is not supported diff --git a/libcxx/test/libcxx/module_std.gen.py b/libcxx/test/libcxx/module_std.gen.py --- a/libcxx/test/libcxx/module_std.gen.py +++ b/libcxx/test/libcxx/module_std.gen.py @@ -127,7 +127,6 @@ f"""\ //--- module_std.sh.cpp // UNSUPPORTED{BLOCKLIT}: c++03, c++11, c++14, c++17, c++20 -// UNSUPPORTED{BLOCKLIT}: c++26 // UNSUPPORTED{BLOCKLIT}: libcpp-has-no-std-modules // UNSUPPORTED{BLOCKLIT}: modules-build diff --git a/libcxx/test/lit.local.cfg b/libcxx/test/lit.local.cfg --- a/libcxx/test/lit.local.cfg +++ b/libcxx/test/lit.local.cfg @@ -31,11 +31,7 @@ std = getSubstitution("%{cxx_std}", config) if std == "cxx26": - # This fails to work properly. It might be due to - # CMAKE_CXX_STANDARD 26 - # does not work in CMake 3.26, it requires the upcomming CMake 3.27. - # TODO MODULES test whether this is fixed with CMake 3.27. - std = "" + std = "26" elif std == "cxx23": std = "23" else: diff --git a/libcxx/test/std/modules/std.pass.cpp b/libcxx/test/std/modules/std.pass.cpp --- a/libcxx/test/std/modules/std.pass.cpp +++ b/libcxx/test/std/modules/std.pass.cpp @@ -7,8 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 -// TODO MODULES fix c++26 -// XFAIL: c++26 // UNSUPPORTED: libcpp-has-no-std-modules // UNSUPPORTED: modules-build diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml --- a/libcxx/utils/ci/buildkite-pipeline.yml +++ b/libcxx/utils/ci/buildkite-pipeline.yml @@ -116,8 +116,11 @@ - "**/test-results.xml" - "**/*.abilist" env: - CC: "clang-${LLVM_HEAD_VERSION}" - CXX: "clang++-${LLVM_HEAD_VERSION}" + # Note modules require and absolute path for clang-scan-deps + # https://github.com/llvm/llvm-project/issues/61006 + CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang" + CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++" + CMAKE: "/opt/bin/cmake" ENABLE_CLANG_TIDY: "On" agents: queue: "libcxx-builders"