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
This commit is contained in:
Saleem Abdulrasool
2017-02-13 15:26:51 +00:00
parent 766ba68107
commit 5748d2b404

View File

@@ -1012,10 +1012,16 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
#define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK #define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
#endif #endif
#if (defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS) && defined(__clang__) \ #if defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS)
&& __has_attribute(acquire_capability)) #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 #define _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
#endif #endif
#endif
#endif
#if __has_attribute(require_constant_initialization) #if __has_attribute(require_constant_initialization)
#define _LIBCPP_SAFE_STATIC __attribute__((__require_constant_initialization__)) #define _LIBCPP_SAFE_STATIC __attribute__((__require_constant_initialization__))