config: disable thread safety analysis on COFF

clang cannot properly handle __declspec and __attribute__ on classes
right now.  This prevents the shared_mutex tests from working.  Disable
the use of the annotation on COFF targets.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294958 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__config b/include/__config
index 10de952..3853916 100644
--- a/include/__config
+++ b/include/__config
@@ -1012,10 +1012,16 @@
 #define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
 #endif
 
-#if (defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS) && defined(__clang__) \
-      && __has_attribute(acquire_capability))
+#if defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS)
+#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)
 #define _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
 #endif
+#endif
+#endif
 
 #if __has_attribute(require_constant_initialization)
 #define _LIBCPP_SAFE_STATIC __attribute__((__require_constant_initialization__))