[libcxx-commits] [PATCH] D158347: [libc++][C++20 modules] Tests no random device build.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Aug 20 06:53:39 PDT 2023
Mordante created this revision.
Herald added a subscriber: arichardson.
Herald added a project: All.
Mordante published this revision for review.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Depends on D158337 <https://reviews.llvm.org/D158337>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158347
Files:
libcxx/cmake/caches/Generic-no-random_device.cmake
libcxx/docs/Modules.rst
libcxx/modules/CMakeLists.txt.in
libcxx/modules/std/random.inc
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
@@ -611,8 +611,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/modules/std/random.inc
===================================================================
--- libcxx/modules/std/random.inc
+++ libcxx/modules/std/random.inc
@@ -42,8 +42,10 @@
using std::default_random_engine;
+#ifndef _LIBCPP_HAS_NO_RANDOM_DEVICE
// [rand.device], class random_device
using std::random_device;
+#endif
// [rand.util.seedseq], class seed_seq
using std::seed_seq;
Index: libcxx/modules/CMakeLists.txt.in
===================================================================
--- libcxx/modules/CMakeLists.txt.in
+++ libcxx/modules/CMakeLists.txt.in
@@ -29,9 +29,6 @@
endif()
endmacro()
-if(NOT @LIBCXX_ENABLE_RANDOM_DEVICE@)
- message(FATAL_ERROR "Modules without randome device support is not yet implemented.")
-endif()
if(NOT @LIBCXX_ENABLE_UNICODE@)
message(FATAL_ERROR "Modules without Unicode support is not yet implemented.")
endif()
Index: libcxx/docs/Modules.rst
===================================================================
--- libcxx/docs/Modules.rst
+++ libcxx/docs/Modules.rst
@@ -46,6 +46,7 @@
* ``LIBCXX_ENABLE_WIDE_CHARACTERS``
* ``LIBCXX_ENABLE_THREADS``
* ``LIBCXX_ENABLE_FILESYSTEM``
+ * ``LIBCXX_ENABLE_RANDOM_DEVICE``
Some of the current limitations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: libcxx/cmake/caches/Generic-no-random_device.cmake
===================================================================
--- libcxx/cmake/caches/Generic-no-random_device.cmake
+++ libcxx/cmake/caches/Generic-no-random_device.cmake
@@ -1 +1,2 @@
+set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
set(LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158347.551784.patch
Type: text/x-patch
Size: 2455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230820/7b548692/attachment.bin>
More information about the libcxx-commits
mailing list