[libcxx-commits] [PATCH] D118192: [libcxx] Allow using thread safety annotations in MinGW mode
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 28 01:22:28 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGde5d38ef2de6: [libcxx] Allow using thread safety annotations in MinGW mode (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118192/new/
https://reviews.llvm.org/D118192
Files:
libcxx/include/__config
libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
Index: libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
===================================================================
--- libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
+++ libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
@@ -8,7 +8,7 @@
// On Windows Clang bugs out when both __declspec and __attribute__ are present,
// the processing goes awry preventing the definition of the types.
-// XFAIL: LIBCXX-WINDOWS-FIXME
+// XFAIL: msvc
// UNSUPPORTED: libcpp-has-no-threads
// REQUIRES: thread-safety
Index: libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
===================================================================
--- libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
+++ libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
@@ -8,7 +8,7 @@
// On Windows Clang bugs out when both __declspec and __attribute__ are present,
// the processing goes awry preventing the definition of the types.
-// XFAIL: LIBCXX-WINDOWS-FIXME
+// XFAIL: msvc
// UNSUPPORTED: libcpp-has-no-threads
// REQUIRES: thread-safety
Index: libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
===================================================================
--- libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
+++ libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
@@ -8,7 +8,7 @@
// On Windows Clang bugs out when both __declspec and __attribute__ are present,
// the processing goes awry preventing the definition of the types.
-// XFAIL: LIBCXX-WINDOWS-FIXME
+// XFAIL: msvc
// UNSUPPORTED: libcpp-has-no-threads
// REQUIRES: thread-safety
Index: libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
===================================================================
--- libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
+++ libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
@@ -8,7 +8,7 @@
// On Windows Clang bugs out when both __declspec and __attribute__ are present,
// the processing goes awry preventing the definition of the types.
-// XFAIL: LIBCXX-WINDOWS-FIXME
+// XFAIL: msvc
// UNSUPPORTED: libcpp-has-no-threads
// REQUIRES: thread-safety
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -1258,8 +1258,9 @@
# if defined(__clang__) && __has_attribute(acquire_capability)
// Work around the attribute handling in clang. When both __declspec and
// __attribute__ are present, the processing goes awry preventing the definition
-// of the types.
-# if !defined(_LIBCPP_OBJECT_FORMAT_COFF)
+// of the types. In MinGW mode, __declspec evaluates to __attribute__, and thus
+// combining the two does work.
+# if !defined(_MSC_VER)
# define _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
# endif
# endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118192.403922.patch
Type: text/x-patch
Size: 3074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220128/577ca6c4/attachment-0001.bin>
More information about the libcxx-commits
mailing list