[libcxx-commits] [libcxx] 30f9b47 - [libc++][CI] Test std module in C++26 mode.
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 22 11:08:57 PDT 2023
Author: Mark de Wever
Date: 2023-08-22T20:08:52+02:00
New Revision: 30f9b47907e72dfd0cda09b9513791e3663acb83
URL: https://github.com/llvm/llvm-project/commit/30f9b47907e72dfd0cda09b9513791e3663acb83
DIFF: https://github.com/llvm/llvm-project/commit/30f9b47907e72dfd0cda09b9513791e3663acb83.diff
LOG: [libc++][CI] Test std module in C++26 mode.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D153408
Added:
Modified:
libcxx/cmake/caches/Generic-cxx26.cmake
libcxx/docs/Modules.rst
libcxx/test/libcxx/module_std.gen.py
libcxx/test/lit.local.cfg
libcxx/test/std/modules/std.pass.cpp
libcxx/utils/ci/buildkite-pipeline.yml
Removed:
################################################################################
diff --git a/libcxx/cmake/caches/Generic-cxx26.cmake b/libcxx/cmake/caches/Generic-cxx26.cmake
index 6ba9482af57851..f48d72d493c2f5 100644
--- 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
index f5efb454994a20..2fde26ad53e15e 100644
--- a/libcxx/docs/Modules.rst
+++ b/libcxx/docs/Modules.rst
@@ -49,12 +49,13 @@ Some of the current limitations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* 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
index e917e791cfc50a..af9b652911bdcb 100644
--- 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
index fe530409c399f2..16ab3b1b622a1c 100644
--- a/libcxx/test/lit.local.cfg
+++ b/libcxx/test/lit.local.cfg
@@ -31,11 +31,7 @@ def appendToSubstitution(substitutions, key, value):
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
index b0b6ebe0255a0c..c237598c21cf5a 100644
--- 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
index 7db7b04684f339..3bd64e38e87f18 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -116,8 +116,11 @@ steps:
- "**/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"
More information about the libcxx-commits
mailing list