Skip to content

Commit

Permalink
[libcxx] Allow using thread safety annotations in MinGW mode
Browse files Browse the repository at this point in the history
These were omitted in all Windows configurations, but it turns out
that they work just fine in MinGW mode.

This allows converting a couple cases of "XFAIL: LIBCXX-WINDOWS-FIXME"
into "XFAIL: msvc" as the bug is specific to MSVC mode (clang-cl).

Differential Revision: https://reviews.llvm.org/D118192
  • Loading branch information
mstorsjo committed Jan 28, 2022
1 parent 5b79d5a commit de5d38e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions libcxx/include/__config
Expand Up @@ -1258,8 +1258,9 @@ extern "C" _LIBCPP_FUNC_VIS void __sanitizer_annotate_contiguous_container(
# 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
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down

0 comments on commit de5d38e

Please sign in to comment.