Author: compnerd Date: Mon Feb 13 09:26:51 2017 New Revision: 294958 URL: http://llvm.org/viewvc/llvm-project?rev=294958&view=rev Log: 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. Modified: libcxx/trunk/include/__config Modified: libcxx/trunk/include/__config URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=294958&r1=294957&r2=294958&view=diff ============================================================================== --- libcxx/trunk/include/__config (original) +++ libcxx/trunk/include/__config Mon Feb 13 09:26:51 2017 @@ -1012,10 +1012,16 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit #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__)) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits