[libcxx-commits] [PATCH] D153408: [libc++][CI] Test std module in C++26 mode.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 16 10:30:35 PDT 2023
Mordante updated this revision to Diff 550805.
Mordante added a comment.
Rebased, resoved merge conflicts.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153408/new/
https://reviews.llvm.org/D153408
Files:
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
Index: libcxx/utils/ci/buildkite-pipeline.yml
===================================================================
--- libcxx/utils/ci/buildkite-pipeline.yml
+++ 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"
Index: libcxx/test/std/modules/std.pass.cpp
===================================================================
--- libcxx/test/std/modules/std.pass.cpp
+++ 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
Index: libcxx/test/lit.local.cfg
===================================================================
--- libcxx/test/lit.local.cfg
+++ 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:
Index: libcxx/test/libcxx/module_std.gen.py
===================================================================
--- libcxx/test/libcxx/module_std.gen.py
+++ 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
Index: libcxx/docs/Modules.rst
===================================================================
--- libcxx/docs/Modules.rst
+++ 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
Index: libcxx/cmake/caches/Generic-cxx26.cmake
===================================================================
--- libcxx/cmake/caches/Generic-cxx26.cmake
+++ 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 "")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153408.550805.patch
Type: text/x-patch
Size: 3418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230816/a9e52516/attachment.bin>
More information about the libcxx-commits
mailing list