diff --git a/libcxx/cmake/caches/Generic-no-random_device.cmake b/libcxx/cmake/caches/Generic-no-random_device.cmake --- a/libcxx/cmake/caches/Generic-no-random_device.cmake +++ b/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 "") diff --git a/libcxx/docs/Modules.rst b/libcxx/docs/Modules.rst --- a/libcxx/docs/Modules.rst +++ b/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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/libcxx/modules/CMakeLists.txt.in b/libcxx/modules/CMakeLists.txt.in --- a/libcxx/modules/CMakeLists.txt.in +++ b/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() diff --git a/libcxx/modules/std/random.inc b/libcxx/modules/std/random.inc --- a/libcxx/modules/std/random.inc +++ b/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; 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 @@ -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"