diff --git a/libcxx/include/__availability b/libcxx/include/__availability --- a/libcxx/include/__availability +++ b/libcxx/include/__availability @@ -215,13 +215,20 @@ # define _LIBCPP_AVAILABILITY_TO_CHARS \ _LIBCPP_AVAILABILITY_FILESYSTEM - // Note: Those are not ABI-stable yet, so we can't ship them. # define _LIBCPP_AVAILABILITY_SYNC \ - __attribute__((unavailable)) -# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait -# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier -# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch -# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore + __attribute__((availability(macosx,strict,introduced=11.0))) \ + __attribute__((availability(ios,strict,introduced=14.0))) \ + __attribute__((availability(tvos,strict,introduced=14.0))) \ + __attribute__((availability(watchos,strict,introduced=7.0))) +# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) || \ + (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 140000) || \ + (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 140000) || \ + (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 70000) +# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait +# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier +# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch +# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore +# endif #else diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait.pass.cpp --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait.pass.cpp @@ -10,9 +10,8 @@ // XFAIL: c++03 // XFAIL: !non-lockfree-atomics -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.barrier/arrive.pass.cpp b/libcxx/test/std/thread/thread.barrier/arrive.pass.cpp --- a/libcxx/test/std/thread/thread.barrier/arrive.pass.cpp +++ b/libcxx/test/std/thread/thread.barrier/arrive.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.barrier/arrive_and_drop.pass.cpp b/libcxx/test/std/thread/thread.barrier/arrive_and_drop.pass.cpp --- a/libcxx/test/std/thread/thread.barrier/arrive_and_drop.pass.cpp +++ b/libcxx/test/std/thread/thread.barrier/arrive_and_drop.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.barrier/arrive_and_wait.pass.cpp b/libcxx/test/std/thread/thread.barrier/arrive_and_wait.pass.cpp --- a/libcxx/test/std/thread/thread.barrier/arrive_and_wait.pass.cpp +++ b/libcxx/test/std/thread/thread.barrier/arrive_and_wait.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.barrier/completion.pass.cpp b/libcxx/test/std/thread/thread.barrier/completion.pass.cpp --- a/libcxx/test/std/thread/thread.barrier/completion.pass.cpp +++ b/libcxx/test/std/thread/thread.barrier/completion.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.latch/arrive_and_wait.pass.cpp b/libcxx/test/std/thread/thread.latch/arrive_and_wait.pass.cpp --- a/libcxx/test/std/thread/thread.latch/arrive_and_wait.pass.cpp +++ b/libcxx/test/std/thread/thread.latch/arrive_and_wait.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.latch/count_down.pass.cpp b/libcxx/test/std/thread/thread.latch/count_down.pass.cpp --- a/libcxx/test/std/thread/thread.latch/count_down.pass.cpp +++ b/libcxx/test/std/thread/thread.latch/count_down.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.latch/try_wait.pass.cpp b/libcxx/test/std/thread/thread.latch/try_wait.pass.cpp --- a/libcxx/test/std/thread/thread.latch/try_wait.pass.cpp +++ b/libcxx/test/std/thread/thread.latch/try_wait.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.semaphore/acquire.pass.cpp b/libcxx/test/std/thread/thread.semaphore/acquire.pass.cpp --- a/libcxx/test/std/thread/thread.semaphore/acquire.pass.cpp +++ b/libcxx/test/std/thread/thread.semaphore/acquire.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.semaphore/binary.pass.cpp b/libcxx/test/std/thread/thread.semaphore/binary.pass.cpp --- a/libcxx/test/std/thread/thread.semaphore/binary.pass.cpp +++ b/libcxx/test/std/thread/thread.semaphore/binary.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.semaphore/release.pass.cpp b/libcxx/test/std/thread/thread.semaphore/release.pass.cpp --- a/libcxx/test/std/thread/thread.semaphore/release.pass.cpp +++ b/libcxx/test/std/thread/thread.semaphore/release.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.semaphore/timed.pass.cpp b/libcxx/test/std/thread/thread.semaphore/timed.pass.cpp --- a/libcxx/test/std/thread/thread.semaphore/timed.pass.cpp +++ b/libcxx/test/std/thread/thread.semaphore/timed.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13 diff --git a/libcxx/test/std/thread/thread.semaphore/try_acquire.pass.cpp b/libcxx/test/std/thread/thread.semaphore/try_acquire.pass.cpp --- a/libcxx/test/std/thread/thread.semaphore/try_acquire.pass.cpp +++ b/libcxx/test/std/thread/thread.semaphore/try_acquire.pass.cpp @@ -9,9 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++03, c++11 -// This test requires the dylib support introduced in D68480, -// which hasn't shipped yet. -// XFAIL: with_system_cxx_lib=macosx +// This test requires the dylib support introduced in D68480, which shipped in +// macOS 11.0. // XFAIL: with_system_cxx_lib=macosx10.15 // XFAIL: with_system_cxx_lib=macosx10.14 // XFAIL: with_system_cxx_lib=macosx10.13