[libcxx-commits] [libcxx] 101cfe1 - [libcxx] Fix build bustage with threads disabled
Michael Platings via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 23 10:30:58 PDT 2023
Author: Mike Hommey
Date: 2023-03-23T17:30:34Z
New Revision: 101cfe18f7b80801be3e415ad62acfc57960ad90
URL: https://github.com/llvm/llvm-project/commit/101cfe18f7b80801be3e415ad62acfc57960ad90
DIFF: https://github.com/llvm/llvm-project/commit/101cfe18f7b80801be3e415ad62acfc57960ad90.diff
LOG: [libcxx] Fix build bustage with threads disabled
Building with -DLIBCXX_ENABLE_THREADS=OFF -DLIBCXXABI_ENABLE_THREADS=OFF
(like e.g. for wasm) fails after D146228 because of a misplaced std
namespace begin/end.
Reviewed By: philnik, #libc
Differential Revision: https://reviews.llvm.org/D146682
Added:
Modified:
libcxx/include/__condition_variable/condition_variable.h
Removed:
################################################################################
diff --git a/libcxx/include/__condition_variable/condition_variable.h b/libcxx/include/__condition_variable/condition_variable.h
index e66f78725a08c..926effbb23e8e 100644
--- a/libcxx/include/__condition_variable/condition_variable.h
+++ b/libcxx/include/__condition_variable/condition_variable.h
@@ -29,10 +29,10 @@
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
-#ifndef _LIBCPP_HAS_NO_THREADS
-
_LIBCPP_BEGIN_NAMESPACE_STD
+#ifndef _LIBCPP_HAS_NO_THREADS
+
// enum class cv_status
_LIBCPP_DECLARE_STRONG_ENUM(cv_status){no_timeout, timeout};
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status)
@@ -234,10 +234,10 @@ inline void condition_variable::__do_timed_wait(unique_lock<mutex>& __lk,
wait_for(__lk, __tp - _Clock::now());
}
-_LIBCPP_END_NAMESPACE_STD
-
#endif // _LIBCPP_HAS_NO_THREADS
+_LIBCPP_END_NAMESPACE_STD
+
_LIBCPP_POP_MACROS
#endif // _LIBCPP___CONDITION_VARIABLE_CONDITION_VARIABLE_H
More information about the libcxx-commits
mailing list