aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcxx/cmake/caches/Generic-no-threads.cmake1
-rw-r--r--libcxx/docs/Modules.rst1
-rw-r--r--libcxx/modules/CMakeLists.txt.in3
-rw-r--r--libcxx/modules/std/barrier.inc2
-rw-r--r--libcxx/modules/std/chrono.inc2
-rw-r--r--libcxx/modules/std/condition_variable.inc4
-rw-r--r--libcxx/modules/std/future.inc2
-rw-r--r--libcxx/modules/std/latch.inc2
-rw-r--r--libcxx/modules/std/memory.inc2
-rw-r--r--libcxx/modules/std/mutex.inc2
-rw-r--r--libcxx/modules/std/semaphore.inc2
-rw-r--r--libcxx/modules/std/shared_mutex.inc2
-rw-r--r--libcxx/modules/std/stop_token.inc2
-rw-r--r--libcxx/modules/std/thread.inc6
-rw-r--r--libcxx/utils/ci/buildkite-pipeline.yml7
15 files changed, 31 insertions, 9 deletions
diff --git a/libcxx/cmake/caches/Generic-no-threads.cmake b/libcxx/cmake/caches/Generic-no-threads.cmake
index 616baef..2aeab22 100644
--- a/libcxx/cmake/caches/Generic-no-threads.cmake
+++ b/libcxx/cmake/caches/Generic-no-threads.cmake
@@ -1,3 +1,4 @@
+set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
set(LIBCXX_ENABLE_THREADS OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_THREADS OFF CACHE BOOL "")
set(LIBCXX_ENABLE_MONOTONIC_CLOCK OFF CACHE BOOL "")
diff --git a/libcxx/docs/Modules.rst b/libcxx/docs/Modules.rst
index 2fde26a..cba8d78 100644
--- a/libcxx/docs/Modules.rst
+++ b/libcxx/docs/Modules.rst
@@ -44,6 +44,7 @@ What works
* ``LIBCXX_ENABLE_LOCALIZATION``
* ``LIBCXX_ENABLE_WIDE_CHARACTERS``
+ * ``LIBCXX_ENABLE_THREADS``
Some of the current limitations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/libcxx/modules/CMakeLists.txt.in b/libcxx/modules/CMakeLists.txt.in
index 88272e1..a3ba345 100644
--- a/libcxx/modules/CMakeLists.txt.in
+++ b/libcxx/modules/CMakeLists.txt.in
@@ -29,9 +29,6 @@ macro(compile_define_if condition def)
endif()
endmacro()
-if(NOT @LIBCXX_ENABLE_THREADS@ OR NOT @LIBCXXABI_ENABLE_THREADS@ OR NOT @LIBCXX_ENABLE_MONOTONIC_CLOCK@)
- message(FATAL_ERROR "Modules without thread support is not yet implemented.")
-endif()
if(NOT @LIBCXX_ENABLE_FILESYSTEM@)
message(FATAL_ERROR "Modules without filesystem support is not yet implemented.")
endif()
diff --git a/libcxx/modules/std/barrier.inc b/libcxx/modules/std/barrier.inc
index bafd87e..dadb67f 100644
--- a/libcxx/modules/std/barrier.inc
+++ b/libcxx/modules/std/barrier.inc
@@ -8,5 +8,7 @@
//===----------------------------------------------------------------------===//
export namespace std {
+#ifndef _LIBCPP_HAS_NO_THREADS
using std::barrier;
+#endif // _LIBCPP_HAS_NO_THREADS
} // namespace std
diff --git a/libcxx/modules/std/chrono.inc b/libcxx/modules/std/chrono.inc
index b5e6ee7..8976e2a 100644
--- a/libcxx/modules/std/chrono.inc
+++ b/libcxx/modules/std/chrono.inc
@@ -112,8 +112,10 @@ export namespace std {
using std::chrono::file_time;
+#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
// [time.clock.steady], class steady_clock
using std::chrono::steady_clock;
+#endif
// [time.clock.hires], class high_resolution_clock
using std::chrono::high_resolution_clock;
diff --git a/libcxx/modules/std/condition_variable.inc b/libcxx/modules/std/condition_variable.inc
index 95d00f3c..b428918 100644
--- a/libcxx/modules/std/condition_variable.inc
+++ b/libcxx/modules/std/condition_variable.inc
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
export namespace std {
-
+#ifndef _LIBCPP_HAS_NO_THREADS
// [thread.condition.condvar], class condition_variable
using std::condition_variable;
// [thread.condition.condvarany], class condition_variable_any
@@ -18,5 +18,5 @@ export namespace std {
using std::notify_all_at_thread_exit;
using std::cv_status;
-
+#endif // _LIBCPP_HAS_NO_THREADS
} // namespace std
diff --git a/libcxx/modules/std/future.inc b/libcxx/modules/std/future.inc
index 8ff034d..2500ad1 100644
--- a/libcxx/modules/std/future.inc
+++ b/libcxx/modules/std/future.inc
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
export namespace std {
+#ifndef _LIBCPP_HAS_NO_THREADS
using std::future_errc;
using std::future_status;
using std::launch;
@@ -50,4 +51,5 @@ export namespace std {
// [futures.async], function template async
using std::async;
+#endif // _LIBCPP_HAS_NO_THREADS
} // namespace std
diff --git a/libcxx/modules/std/latch.inc b/libcxx/modules/std/latch.inc
index 5afb8ff..922a55e 100644
--- a/libcxx/modules/std/latch.inc
+++ b/libcxx/modules/std/latch.inc
@@ -8,5 +8,7 @@
//===----------------------------------------------------------------------===//
export namespace std {
+#ifndef _LIBCPP_HAS_NO_THREADS
using std::latch;
+#endif // _LIBCPP_HAS_NO_THREADS
} // namespace std
diff --git a/libcxx/modules/std/memory.inc b/libcxx/modules/std/memory.inc
index 06af546..d91c549 100644
--- a/libcxx/modules/std/memory.inc
+++ b/libcxx/modules/std/memory.inc
@@ -187,6 +187,7 @@ export namespace std {
// [inout.ptr], function template inout_ptr
// using std::inout_ptr;
+#ifndef _LIBCPP_HAS_NO_THREADS
// [depr.util.smartptr.shared.atomic]
using std::atomic_is_lock_free;
@@ -203,4 +204,5 @@ export namespace std {
using std::atomic_compare_exchange_strong_explicit;
using std::atomic_compare_exchange_weak;
using std::atomic_compare_exchange_weak_explicit;
+#endif // _LIBCPP_HAS_NO_THREADS
} // namespace std
diff --git a/libcxx/modules/std/mutex.inc b/libcxx/modules/std/mutex.inc
index fa55324..24c7f2e 100644
--- a/libcxx/modules/std/mutex.inc
+++ b/libcxx/modules/std/mutex.inc
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
export namespace std {
+#ifndef _LIBCPP_HAS_NO_THREADS
// [thread.mutex.class], class mutex
using std::mutex;
// [thread.mutex.recursive], class recursive_mutex
@@ -35,6 +36,7 @@ export namespace std {
// [thread.lock.algorithm], generic locking algorithms
using std::lock;
using std::try_lock;
+#endif // _LIBCPP_HAS_NO_THREADS
using std::once_flag;
diff --git a/libcxx/modules/std/semaphore.inc b/libcxx/modules/std/semaphore.inc
index bc8d905..a8c8a1b 100644
--- a/libcxx/modules/std/semaphore.inc
+++ b/libcxx/modules/std/semaphore.inc
@@ -8,8 +8,10 @@
//===----------------------------------------------------------------------===//
export namespace std {
+#ifndef _LIBCPP_HAS_NO_THREADS
// [thread.sema.cnt], class template counting_semaphore
using std::counting_semaphore;
using std::binary_semaphore;
+#endif // _LIBCPP_HAS_NO_THREADS
} // namespace std
diff --git a/libcxx/modules/std/shared_mutex.inc b/libcxx/modules/std/shared_mutex.inc
index 2b0782e..5f09446 100644
--- a/libcxx/modules/std/shared_mutex.inc
+++ b/libcxx/modules/std/shared_mutex.inc
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
export namespace std {
+#ifndef _LIBCPP_HAS_NO_THREADS
// [thread.sharedmutex.class], class shared_­mutex
using std::shared_mutex;
// [thread.sharedtimedmutex.class], class shared_­timed_­mutex
@@ -15,4 +16,5 @@ export namespace std {
// [thread.lock.shared], class template shared_­lock
using std::shared_lock;
using std::swap;
+#endif // _LIBCPP_HAS_NO_THREADS
} // namespace std
diff --git a/libcxx/modules/std/stop_token.inc b/libcxx/modules/std/stop_token.inc
index 80b53e9..5daf460 100644
--- a/libcxx/modules/std/stop_token.inc
+++ b/libcxx/modules/std/stop_token.inc
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
export namespace std {
+#ifndef _LIBCPP_HAS_NO_THREADS
// [stoptoken], class stop_­token
using std::stop_token;
@@ -20,4 +21,5 @@ export namespace std {
// [stopcallback], class template stop_­callback
using std::stop_callback;
+#endif // _LIBCPP_HAS_NO_THREADS
} // namespace std
diff --git a/libcxx/modules/std/thread.inc b/libcxx/modules/std/thread.inc
index 89b1d23..114840e 100644
--- a/libcxx/modules/std/thread.inc
+++ b/libcxx/modules/std/thread.inc
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
export namespace std {
+#ifndef _LIBCPP_HAS_NO_THREADS
// [thread.thread.class], class thread
using std::thread;
@@ -28,11 +29,12 @@ export namespace std {
// [thread.thread.id]
using std::operator==;
using std::operator<=>;
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# ifndef _LIBCPP_HAS_NO_LOCALIZATION
using std::operator<<;
-#endif // _LIBCPP_HAS_NO_LOCALIZATION
+# endif // _LIBCPP_HAS_NO_LOCALIZATION
using std::formatter;
using std::hash;
+#endif // _LIBCPP_HAS_NO_THREADS
} // namespace std
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index cce1c5a..2b6cd6e2 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -569,8 +569,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"