forked from OSchip/llvm-project
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. llvm-svn: 294958
This commit is contained in:
parent
8a5789ebd1
commit
3444e9fa15
|
@ -1012,10 +1012,16 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||
#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__))
|
||||
|
|
Loading…
Reference in New Issue