Author: Louis Dionne
Date: 2024-06-21T10:31:22-04:00
New Revision: db8c7e004a8acf74f40e0f7bc60066f26d43ccd9

URL: 
https://github.com/llvm/llvm-project/commit/db8c7e004a8acf74f40e0f7bc60066f26d43ccd9
DIFF: 
https://github.com/llvm/llvm-project/commit/db8c7e004a8acf74f40e0f7bc60066f26d43ccd9.diff

LOG: [libc++] Fix deployment target Lit features (#94791)

We were not making any distinction between e.g. the "Apple-flavored"
libc++ built from trunk and the system-provided standard library on
Apple platforms. For example, any test that would be XFAILed on a
back-deployment target would unexpectedly pass when run on that
deployment target against the tip of trunk Apple-flavored libc++. In
reality, that test would be expected to pass because we're running
against the latest libc++, even if it is Apple-flavored.

To solve this issue, we introduce a new feature that describes whether
the Standard Library in use is the one provided by the system by
default, and that notion is different from the underlying standard
library flavor. We also refactor the existing Lit features to make a
distinction between availability markup and the library we're running
against at runtime, which otherwise limit the flexibility of what we can
express in the test suite. Finally, we refactor some of the
back-deployment versions that were incorrect (such as thinking that LLVM
10 was introduced in macOS 11, when in reality macOS 11 was synced with
LLVM 11).

Fixes #82107

Added: 
    

Modified: 
    libcxx/include/__configuration/availability.h
    libcxx/lib/abi/CHANGELOG.TXT
    libcxx/test/configs/apple-libc++-backdeployment.cfg.in
    libcxx/test/libcxx/atomics/atomics.syn/wait.pass.cpp
    
libcxx/test/libcxx/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp
    libcxx/test/libcxx/language.support/cxa_deleted_virtual.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
    
libcxx/test/libcxx/strings/basic.string/string.capacity/allocation_size.pass.cpp
    
libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
    
libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
    
libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.signals.pass.cpp
    libcxx/test/std/depr/depr.c.headers/stdlib_h.aligned_alloc.compile.pass.cpp
    
libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
    
libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
    
libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp
    
libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
    
libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
    
libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
    
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
    
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
    
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
    
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
    
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
    
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
    
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
    
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
    
libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp
    
libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
    
libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.multiple.pass.cpp
    
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.pass.cpp
    
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.pass.cpp
    
libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp
    
libcxx/test/std/language.support/support.runtime/cstdlib.aligned_alloc.compile.pass.cpp
    
libcxx/test/std/language.support/support.runtime/ctime.timespec.compile.pass.cpp
    libcxx/test/std/localization/codecvt_unicode.pass.cpp
    
libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp
    
libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp
    
libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp
    
libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp
    
libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp
    
libcxx/test/std/localization/locales/locale/locale.cons/name_construction.pass.cpp
    libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
    libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp
    libcxx/test/std/thread/futures/futures.async/async_race.38682.pass.cpp
    libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp
    
libcxx/test/std/thread/thread.condition/notify_all_at_thread_exit_lwg3343.pass.cpp
    libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
    libcxx/utils/ci/buildkite-pipeline.yml
    libcxx/utils/ci/run-buildbot
    libcxx/utils/libcxx/test/features.py
    libcxx/utils/libcxx/test/params.py
    libcxxabi/test/catch_function_01.pass.cpp
    libcxxabi/test/catch_function_03.pass.cpp
    libcxxabi/test/catch_member_data_pointer_01.pass.cpp
    libcxxabi/test/catch_member_function_pointer_02.pass.cpp
    libcxxabi/test/catch_member_pointer_nullptr.pass.cpp
    libcxxabi/test/catch_multi_level_pointer.pass.cpp
    libcxxabi/test/catch_null_pointer_to_object_pr64953.pass.cpp
    libcxxabi/test/catch_pointer_nullptr.pass.cpp
    libcxxabi/test/catch_ptr_02.pass.cpp
    libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in
    libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp
    libcxxabi/test/dynamic_cast.pass.cpp
    libcxxabi/test/exception_object_alignment.pass.cpp
    libcxxabi/test/forced_unwind1.pass.cpp
    libcxxabi/test/forced_unwind2.pass.cpp
    libcxxabi/test/incomplete_type.sh.cpp
    libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp
    libcxxabi/test/test_demangle.pass.cpp
    libcxxabi/test/test_exception_address_alignment.pass.cpp
    libcxxabi/test/uncaught_exception.pass.cpp
    libcxxabi/test/uncaught_exceptions.pass.cpp
    libunwind/test/configs/apple-libunwind-backdeployment.cfg.in
    libunwind/test/libunwind_01.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__configuration/availability.h 
b/libcxx/include/__configuration/availability.h
index 1115431115ec3..7e6e18b22d93a 100644
--- a/libcxx/include/__configuration/availability.h
+++ b/libcxx/include/__configuration/availability.h
@@ -95,8 +95,8 @@
 #  define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH /* nothing */
 #  define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP  /* nothing */
 
-#  define _LIBCPP_INTRODUCED_IN_LLVM_10 1
-#  define _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE /* nothing */
+#  define _LIBCPP_INTRODUCED_IN_LLVM_11 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE /* nothing */
 
 #  define _LIBCPP_INTRODUCED_IN_LLVM_12 1
 #  define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE /* nothing */
@@ -159,22 +159,22 @@
 #    define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP  /* nothing */
 #  endif
 
-// LLVM 10
+// LLVM 11
 // clang-format off
 #  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)
 // clang-format on
-#    define _LIBCPP_INTRODUCED_IN_LLVM_10 0
-#    define _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE                            
                                        \
+#    define _LIBCPP_INTRODUCED_IN_LLVM_11 0
+#    define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE                            
                                        \
       __attribute__((availability(macos, 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)))
 #  else
-#    define _LIBCPP_INTRODUCED_IN_LLVM_10 1
-#    define _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE /* nothing */
+#    define _LIBCPP_INTRODUCED_IN_LLVM_11 1
+#    define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE /* nothing */
 #  endif
 
 // LLVM 12
@@ -290,8 +290,8 @@
 // which requires shared library support for various operations
 // (see libcxx/src/atomic.cpp). This includes <barier>, <latch>,
 // <semaphore>, and notification functions on std::atomic.
-#define _LIBCPP_AVAILABILITY_HAS_SYNC _LIBCPP_INTRODUCED_IN_LLVM_10
-#define _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE
+#define _LIBCPP_AVAILABILITY_HAS_SYNC _LIBCPP_INTRODUCED_IN_LLVM_11
+#define _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE
 
 // Enable additional explicit instantiations of iostreams components. This
 // reduces the number of weak definitions generated in programs that use

diff  --git a/libcxx/lib/abi/CHANGELOG.TXT b/libcxx/lib/abi/CHANGELOG.TXT
index 7a8d5052a0830..32526f1786c6d 100644
--- a/libcxx/lib/abi/CHANGELOG.TXT
+++ b/libcxx/lib/abi/CHANGELOG.TXT
@@ -577,7 +577,7 @@ Version 12.0
   Symbol added: ___cxa_free_dependent_exception
 
 ------------
-Version 10.0
+Version 11.0
 ------------
 
 * 54fa9ecd3088 - [libc++] Implementation of C++20's P1135R6 for libcxx

diff  --git a/libcxx/test/configs/apple-libc++-backdeployment.cfg.in 
b/libcxx/test/configs/apple-libc++-backdeployment.cfg.in
index 42594461f10e7..9843c4a9ad70d 100644
--- a/libcxx/test/configs/apple-libc++-backdeployment.cfg.in
+++ b/libcxx/test/configs/apple-libc++-backdeployment.cfg.in
@@ -55,6 +55,7 @@ config.substitutions.append(('%{exec}',
 ))
 
 config.stdlib = 'apple-libc++'
+config.using_system_stdlib = True
 
 libcxx.test.config.configure(
     libcxx.test.params.DEFAULT_PARAMETERS + BACKDEPLOYMENT_PARAMETERS,

diff  --git a/libcxx/test/libcxx/atomics/atomics.syn/wait.pass.cpp 
b/libcxx/test/libcxx/atomics/atomics.syn/wait.pass.cpp
index f29dc6eb463fe..6ae1c0997aad7 100644
--- a/libcxx/test/libcxx/atomics/atomics.syn/wait.pass.cpp
+++ b/libcxx/test/libcxx/atomics/atomics.syn/wait.pass.cpp
@@ -5,10 +5,14 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 
//===----------------------------------------------------------------------===//
+
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-threads
-// This bug was first fixed in LLVM 19
+
+// This bug was first fixed in LLVM 19. This can't be XFAIL because
+// the test is a no-op (and would XPASS) on some targets.
 // UNSUPPORTED: using-built-library-before-llvm-19
+
 // XFAIL: availability-synchronization_library-missing
 
 #include <atomic>

diff  --git 
a/libcxx/test/libcxx/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp
 
b/libcxx/test/libcxx/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp
index ea42203d05446..e5d48a35f4fd7 100644
--- 
a/libcxx/test/libcxx/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp
+++ 
b/libcxx/test/libcxx/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp
@@ -10,7 +10,7 @@
 
 // The fix for issue 57964 requires an updated dylib due to explicit
 // instantiations. That means Apple backdeployment targets remain broken.
-// UNSUPPORTED: using-built-library-before-llvm-19
+// XFAIL: using-built-library-before-llvm-19
 
 // <ios>
 

diff  --git a/libcxx/test/libcxx/language.support/cxa_deleted_virtual.pass.cpp 
b/libcxx/test/libcxx/language.support/cxa_deleted_virtual.pass.cpp
index 723cd9f33b263..883e176b26268 100644
--- a/libcxx/test/libcxx/language.support/cxa_deleted_virtual.pass.cpp
+++ b/libcxx/test/libcxx/language.support/cxa_deleted_virtual.pass.cpp
@@ -11,7 +11,7 @@
 // Test exporting the symbol: "__cxa_deleted_virtual" in macosx
 // But don't expect the symbol to be exported in previous versions.
 //
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{13|14}}
 
 struct S { virtual void f() = delete; virtual ~S() {} };
 int main(int, char**) {

diff  --git 
a/libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp 
b/libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
index 8415214efa8b8..2b46d4bc2fb08 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
@@ -22,7 +22,7 @@
 // Reported as https://llvm.org/PR53170.
 
 // reserve(n) used to shrink the string until https://llvm.org/D117332 was 
shipped.
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
+// XFAIL: stdlib=system && 
target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
 
 #include <string>
 #include <stdexcept>

diff  --git 
a/libcxx/test/libcxx/strings/basic.string/string.capacity/allocation_size.pass.cpp
 
b/libcxx/test/libcxx/strings/basic.string/string.capacity/allocation_size.pass.cpp
index 1110e3d3ec568..750e7b165723d 100644
--- 
a/libcxx/test/libcxx/strings/basic.string/string.capacity/allocation_size.pass.cpp
+++ 
b/libcxx/test/libcxx/strings/basic.string/string.capacity/allocation_size.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.13|10.15|11.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.13|10.14|10.15|11.0}}
 
 // <string>
 

diff  --git 
a/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
 
b/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
index b1a3f86e86437..b7652b074bde8 100644
--- 
a/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
+++ 
b/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
@@ -14,7 +14,7 @@
 // UNSUPPORTED: c++03
 
 // PR30202 was fixed starting in macosx10.13.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
 
 // <condition_variable>
 

diff  --git 
a/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
 
b/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
index 47741d0851e89..6f08dde2f3132 100644
--- 
a/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
+++ 
b/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
@@ -11,7 +11,7 @@
 // Until 58a0a70fb2f1, this_thread::sleep_for could sometimes get interrupted
 // by signals and this test would fail spuriously. Disable the test on the
 // corresponding system libraries.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
 
 // ALLOW_RETRIES: 3
 

diff  --git 
a/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.signals.pass.cpp
 
b/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.signals.pass.cpp
index ad62e0c113281..12376695fac34 100644
--- 
a/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.signals.pass.cpp
+++ 
b/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.signals.pass.cpp
@@ -14,7 +14,7 @@
 // Until 58a0a70fb2f1, this_thread::sleep_for misbehaves when interrupted by
 // a signal, as tested here. Disable the test on the corresponding system
 // libraries.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
 
 // ALLOW_RETRIES: 3
 

diff  --git 
a/libcxx/test/std/depr/depr.c.headers/stdlib_h.aligned_alloc.compile.pass.cpp 
b/libcxx/test/std/depr/depr.c.headers/stdlib_h.aligned_alloc.compile.pass.cpp
index c0409307a8f4f..7ddf03fff4f4e 100644
--- 
a/libcxx/test/std/depr/depr.c.headers/stdlib_h.aligned_alloc.compile.pass.cpp
+++ 
b/libcxx/test/std/depr/depr.c.headers/stdlib_h.aligned_alloc.compile.pass.cpp
@@ -13,7 +13,7 @@
 
 // ::aligned_alloc is provided by the C library, but it's marked as unavailable
 // until macOS 10.15
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // ::aligned_alloc is not implemented on Windows
 // XFAIL: target={{.+}}-windows-{{.+}}

diff  --git 
a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
 
b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
index 7283fdc769d86..35c2726fda2a0 100644
--- 
a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
+++ 
b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
 
 // <system_error>
 

diff  --git 
a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
 
b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
index 02a1baf599983..0f622289248b7 100644
--- 
a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
+++ 
b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
@@ -12,7 +12,7 @@
 
 // const error_category& system_category();
 
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
 
 #include <system_error>
 #include <cassert>

diff  --git 
a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp
 
b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp
index 4f5002e068c19..f2d5e7dd0e563 100644
--- 
a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp
+++ 
b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp
@@ -11,7 +11,7 @@
 
 // The string reported on errors changed, which makes those tests fail when run
 // against already-released libc++'s.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
 
 // <filesystem>
 

diff  --git 
a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
 
b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
index e1407858f66ac..11295855d3ca0 100644
--- 
a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
+++ 
b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
@@ -11,7 +11,7 @@
 
 // The string reported on errors changed, which makes those tests fail when run
 // against already-released libc++'s.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
 
 // Starting in Android N (API 24), SELinux policy prevents the shell user from
 // creating a FIFO file.

diff  --git 
a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
 
b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
index 514bbb27c2c47..f40b06e106e12 100644
--- 
a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
+++ 
b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
@@ -11,7 +11,7 @@
 
 // The string reported on errors changed, which makes those tests fail when run
 // against already-released libc++'s.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
 
 // Starting in Android N (API 24), SELinux policy prevents the shell user from
 // creating a hard link.

diff  --git 
a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
 
b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
index 41e2ee668f525..72039bb06921f 100644
--- 
a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
+++ 
b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
@@ -11,7 +11,7 @@
 
 // The string reported on errors changed, which makes those tests fail when run
 // against already-released libc++'s.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
 
 // <filesystem>
 

diff  --git 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
index e81beed4f2adf..3209e16d00612 100644
--- 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
+++ 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
@@ -12,7 +12,7 @@
 
 // The string reported on errors changed, which makes those tests fail when run
 // against already-released libc++'s.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
 
 // Starting in Android N (API 24), SELinux policy prevents the shell user from
 // creating a FIFO file.

diff  --git 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
index 9955e08710c56..3658a24b72b28 100644
--- 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
+++ 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
@@ -12,7 +12,7 @@
 // UNSUPPORTED: availability-filesystem-missing
 
 // This test requires the dylib support introduced in D92769.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
 
 // <filesystem>
 

diff  --git 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
index 21f283cae86d5..cdedf0d461260 100644
--- 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
+++ 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
@@ -12,7 +12,7 @@
 // UNSUPPORTED: availability-filesystem-missing
 
 // This test requires the dylib support introduced in http://llvm.org/D92769.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
 
 // <filesystem>
 

diff  --git 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
index a0ec52643e8c0..dee6690997fb1 100644
--- 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
+++ 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
@@ -12,7 +12,7 @@
 // UNSUPPORTED: availability-filesystem-missing
 
 // This test requires the dylib support introduced in http://llvm.org/D92769.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
 
 // <filesystem>
 

diff  --git 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
index 99d303bc4244d..648598bb10124 100644
--- 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
+++ 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
@@ -13,7 +13,7 @@
 
 // The string reported on errors changed, which makes those tests fail when run
 // against already-released libc++'s.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
 
 // <filesystem>
 

diff  --git 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
index d43bc5eea5121..459224d41953a 100644
--- 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
+++ 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
@@ -13,7 +13,7 @@
 
 // The string reported on errors changed, which makes those tests fail when run
 // against already-released libc++'s.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
 
 // <filesystem>
 

diff  --git 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp
 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp
index 5248ba24b4038..5335f8070ffa4 100644
--- 
a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp
+++ 
b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp
@@ -31,9 +31,9 @@
 
 // This test requires a dylib containing the fix shipped in 
https://reviews.llvm.org/D118134.
 // We use UNSUPPORTED instead of XFAIL because the test might not fail 
reliably.
-// UNSUPPORTED: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
-// UNSUPPORTED: stdlib=apple-libc++ && target={{.+}}-apple-macosx11.0
-// UNSUPPORTED: stdlib=apple-libc++ && target={{.+}}-apple-macosx12.{{0|1|2}}
+// UNSUPPORTED: stdlib=system && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
+// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx11.0
+// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx12.{{0|1|2}}
 
 // Windows doesn't support the necessary APIs to mitigate this issue.
 // XFAIL: target={{.+}}-windows-{{.+}}

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp
index c7d7a4e1f83dd..4e915d340b31b 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp
index 7bb793082ee93..c7f2476cf82f0 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp
index cf4070a569a8f..1acc771a6af11 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp
index 6bfd64abd41f6..dfd26975840ee 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp
index 8eca4d4299105..440afad4afb1b 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp
index f290efecb4958..49a2c3d5eb66b 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp
index 04fa1eaff6b36..1f2aee746c87c 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
index ee388e9dc6b1b..df467c98f793c 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp
index 965e029ed657a..3530cd9adfa22 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp
index f15a352f2ecce..3240b482b813e 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp
index 7c26e475aaccf..ba6dc22cacb4c 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp
index d9af9213e43d2..453d17ed31c5b 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp
index de5a989a52d72..70075760c57bf 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
index 35cb70e1e50ef..66a60c15ac060 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
index 13ac4028a0afd..068b70818aa1d 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
index fe15b3678f0e9..dce6ba770b4e0 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp
index 8ae08ba4b99d8..ab8d1f7e7d611 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp
@@ -8,7 +8,7 @@
 
 // In macosx10.9 to macosx10.14, streams are provided in the dylib AND they
 // have a bug in how they handle null-termination in case of errors (see 
D40677).
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp
index f310172b7a8c1..54873944af6a4 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp
@@ -8,7 +8,7 @@
 
 // In macosx10.9 to macosx10.14, streams are provided in the dylib AND they
 // have a bug in how they handle null-termination in case of errors (see 
D40677).
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp
index 331e38caefe4a..7290236a90584 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp
index 50ec7ea54bf08..3d8cbf59e3298 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp
index 8d131da658133..6518469d8aa4e 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp
@@ -8,7 +8,7 @@
 
 // In macosx10.9 to macosx10.14, streams are provided in the dylib AND they
 // have a bug in how they handle null-termination in case of errors (see 
D40677).
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp
index b85478d5ed576..86fd5a656733b 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp
@@ -8,7 +8,7 @@
 
 // In macosx10.9 to macosx10.14, streams are provided in the dylib AND they
 // have a bug in how they handle null-termination in case of errors (see 
D40677).
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp
index e313ddc5b97c1..0a853672cebed 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp
index 29ccb2cb43fe1..45eab0ce28e48 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
index a00842dd3e0db..ba884e0a67b8a 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
index 8b43c31e9f2ba..5af9bda9c6f30 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
 
 // <istream>
 

diff  --git 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
index 4fa58c0abfbaa..3608b99dea972 100644
--- 
a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
@@ -13,8 +13,7 @@
 // The fix for bug 51497 and bug 51499 require and updated dylib due to
 // explicit instantiations. That means Apple backdeployment targets remain
 // broken.
-// TODO(#82107) Enable XFAIL.
-// UNSUPPORTED: using-built-library-before-llvm-19
+// XFAIL: using-built-library-before-llvm-19
 
 #include <istream>
 #include <cassert>

diff  --git 
a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp
index a5b19c4e44cf7..bef2b071c8437 100644
--- 
a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp
@@ -25,7 +25,7 @@
 
 // This test exposes a regression that was not fixed yet in the libc++
 // shipped with macOS 10.12, 10.13 and 10.14. See D32670 for details.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{12|13|14}}
 
 #include <cassert>
 #include <cstdint>

diff  --git 
a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
 
b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
index 207fc42e3cd48..34c143ac14495 100644
--- 
a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
@@ -6,7 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.12
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.12
 
 // <ostream>
 

diff  --git 
a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.multiple.pass.cpp
 
b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.multiple.pass.cpp
index f842f28e1fa4b..1d8fecf34529a 100644
--- 
a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.multiple.pass.cpp
+++ 
b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.multiple.pass.cpp
@@ -16,7 +16,7 @@
 
 // The dylibs shipped on macOS so far do not contain the fix for PR43300, so
 // this test fails.
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 int main(int, char**)
 {

diff  --git 
a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.pass.cpp
 
b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.pass.cpp
index 7fb92938eeeae..563f8bb2c8f32 100644
--- 
a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.pass.cpp
@@ -12,7 +12,7 @@
 // when sized deallocation is not supported, e.g., prior to C++14.
 
 // UNSUPPORTED: sanitizer-new-delete
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
 
 // REQUIRES: -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS: -fsized-deallocation

diff  --git 
a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.pass.cpp
 
b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.pass.cpp
index df8b96447262f..d9d8e038784a8 100644
--- 
a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.pass.cpp
@@ -12,7 +12,7 @@
 // when sized deallocation is not supported, e.g., prior to C++14.
 
 // UNSUPPORTED: sanitizer-new-delete
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
 
 // REQUIRES: -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS: -fsized-deallocation -O3

diff  --git 
a/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp
 
b/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp
index 1d8b6b1560e88..e8a36a92e43ef 100644
--- 
a/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp
@@ -9,11 +9,11 @@
 // UNSUPPORTED: no-exceptions
 
 // std::uncaught_exceptions() was introduced in the dylib on Mac OS 10.12
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
 
 // However, std::uncaught_exceptions() gives the wrong answer in Mac OS 10.12
 // and 10.13, where it only gives 0 or 1. This was fixed later.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{12|13}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{12|13}}
 
 // test uncaught_exceptions
 

diff  --git 
a/libcxx/test/std/language.support/support.runtime/cstdlib.aligned_alloc.compile.pass.cpp
 
b/libcxx/test/std/language.support/support.runtime/cstdlib.aligned_alloc.compile.pass.cpp
index 1c3c546f415b8..da04d9f2dc0ff 100644
--- 
a/libcxx/test/std/language.support/support.runtime/cstdlib.aligned_alloc.compile.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.runtime/cstdlib.aligned_alloc.compile.pass.cpp
@@ -13,7 +13,7 @@
 
 // ::aligned_alloc is provided by the C library, but it's marked as unavailable
 // until macOS 10.15
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // ::aligned_alloc is not implemented on Windows
 // XFAIL: target={{.+}}-windows-{{.+}}

diff  --git 
a/libcxx/test/std/language.support/support.runtime/ctime.timespec.compile.pass.cpp
 
b/libcxx/test/std/language.support/support.runtime/ctime.timespec.compile.pass.cpp
index 12b1c3888132e..87957afc4206e 100644
--- 
a/libcxx/test/std/language.support/support.runtime/ctime.timespec.compile.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.runtime/ctime.timespec.compile.pass.cpp
@@ -16,7 +16,7 @@
 
 // ::timespec_get is provided by the C library, but it's marked as
 // unavailable until macOS 10.15
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // ::timespec_get is available starting with Android Q (API 29)
 // XFAIL: target={{.+}}-android{{(eabi)?(21|22|23|24|25|26|27|28)}}

diff  --git a/libcxx/test/std/localization/codecvt_unicode.pass.cpp 
b/libcxx/test/std/localization/codecvt_unicode.pass.cpp
index 08ecc16ef4311..a434a22ff96ba 100644
--- a/libcxx/test/std/localization/codecvt_unicode.pass.cpp
+++ b/libcxx/test/std/localization/codecvt_unicode.pass.cpp
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS 
-D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0|13.0}}
+// XFAIL: stdlib=system && 
target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0|13.0}}
 
 #include <algorithm>
 #include <cassert>

diff  --git 
a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp
 
b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp
index bbfbe5d5d02ea..05536053825bc 100644
--- 
a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp
+++ 
b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp
@@ -14,8 +14,8 @@
 
 // Before https://llvm.org/D110647, the shared library did not contain
 // std::ctype<char>::table_size, so this test fails with a link error.
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{11.0|12.0|13.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{11.0|12.0|13.0}}
 
 #include <locale>
 #include <cassert>

diff  --git 
a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp
 
b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp
index e093737986c1c..1708e94b682c4 100644
--- 
a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp
+++ 
b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp
@@ -6,11 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) 
changed
-// behavior of FP parsing, while Apple back-deployment targets remain broken 
due
-// to the dylib.
-// UNSUPPORTED: using-built-library-before-llvm-19
-
 // <locale>
 
 // class num_get<charT, InputIterator>

diff  --git 
a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp
 
b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp
index bc6cec45d89a3..8268b5419eb3e 100644
--- 
a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp
+++ 
b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp
@@ -6,11 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) 
changed
-// behavior of FP parsing, while Apple back-deployment targets remain broken 
due
-// to the dylib.
-// UNSUPPORTED: using-built-library-before-llvm-19
-
 // <locale>
 
 // class num_get<charT, InputIterator>

diff  --git 
a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp
 
b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp
index a18084867b2f1..68c8789f92f24 100644
--- 
a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp
+++ 
b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp
@@ -15,7 +15,7 @@
 
 // This test exercises the fix for PR28704, which isn't in the dylib for
 // some systems.
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 #include <locale>
 #include <ios>

diff  --git 
a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp
 
b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp
index f455981e89780..f3569ed6e5d89 100644
--- 
a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp
+++ 
b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp
@@ -6,11 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) 
changed
-// behavior of FP parsing, while Apple back-deployment targets remain broken 
due
-// to the dylib.
-// UNSUPPORTED: using-built-library-before-llvm-19
-
 // <locale>
 
 // class num_get<charT, InputIterator>

diff  --git 
a/libcxx/test/std/localization/locales/locale/locale.cons/name_construction.pass.cpp
 
b/libcxx/test/std/localization/locales/locale/locale.cons/name_construction.pass.cpp
index 471c66989f22f..d7be7e0f95a50 100644
--- 
a/libcxx/test/std/localization/locales/locale/locale.cons/name_construction.pass.cpp
+++ 
b/libcxx/test/std/localization/locales/locale/locale.cons/name_construction.pass.cpp
@@ -18,7 +18,7 @@
 
 // This test exercises the fix for locale name construction (D119441), which
 // isn't in the dylib for some systems.
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
+// XFAIL: stdlib=system && 
target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
 
 #include <locale>
 #include <cassert>

diff  --git a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp 
b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
index 796ab41716dd5..a9583be73af00 100644
--- a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
@@ -7,11 +7,11 @@
 
//===----------------------------------------------------------------------===//
 
 // See https://llvm.org/PR20183
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
 
 // The behavior of std::random_device changed on Apple platforms with
 // https://llvm.org/D116045.
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
+// XFAIL: stdlib=system && 
target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
 
 // UNSUPPORTED: no-random-device
 

diff  --git 
a/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp 
b/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp
index 32ce1c8bf617d..e5e04c27a8e50 100644
--- a/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp
@@ -11,7 +11,7 @@
 // After changing the alignment of the allocated pointer from 16 to 8, the 
exception thrown is no longer `bad_alloc`
 // but instead length_error on systems using new headers but older dylibs.
 //
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.13|10.15|11.0}}
+// XFAIL: using-built-library-before-llvm-18
 
 // <string>
 

diff  --git 
a/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp 
b/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp
index 0b459f9625689..eb8e003b51976 100644
--- 
a/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp
+++ 
b/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp
@@ -7,12 +7,12 @@
 
//===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: no-exceptions
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
 
 // Prior to http://llvm.org/D123580, there was a bug with how the max_size()
 // was calculated. That was inlined into some functions in the dylib, which 
leads
 // to failures when running this test against an older system dylib.
-// XFAIL: stdlib=apple-libc++ && target=arm64-apple-macosx{{11.0|12.0}}
+// XFAIL: stdlib=system && target=arm64-apple-macosx{{11.0|12.0}}
 
 // <string>
 

diff  --git 
a/libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp 
b/libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp
index 30c171680a23c..f466dbd05e747 100644
--- a/libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp
@@ -12,7 +12,7 @@
 
 // This test relies on https://llvm.org/PR45368 being fixed, which isn't in
 // older Apple dylibs
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
+// XFAIL: stdlib=system && 
target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 #include <string>
 #include <stdexcept>

diff  --git 
a/libcxx/test/std/thread/futures/futures.async/async_race.38682.pass.cpp 
b/libcxx/test/std/thread/futures/futures.async/async_race.38682.pass.cpp
index 310aac599a38f..64ff0e76ff2d0 100644
--- a/libcxx/test/std/thread/futures/futures.async/async_race.38682.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.async/async_race.38682.pass.cpp
@@ -11,7 +11,7 @@
 
 // There's currently no release of OS X whose dylib contains the patch for
 // PR38682. Since the fix for future<void> is in the dylib, this test may fail.
-// UNSUPPORTED: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// UNSUPPORTED: stdlib=system && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 // This test is designed to cause and allow TSAN to detect a race condition
 // in std::async, as reported in https://llvm.org/PR38682.

diff  --git a/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp 
b/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp
index 2e971a940c509..05781c24e45b5 100644
--- a/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp
@@ -11,7 +11,7 @@
 // LWG 2056 changed the values of future_errc, so if we're using new headers
 // with an old library we'll get incorrect messages.
 //
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
 
 // VC Runtime's std::exception::what() method is not marked as noexcept, so
 // this fails.

diff  --git 
a/libcxx/test/std/thread/thread.condition/notify_all_at_thread_exit_lwg3343.pass.cpp
 
b/libcxx/test/std/thread/thread.condition/notify_all_at_thread_exit_lwg3343.pass.cpp
index 4c8ba829ce685..c1c1ab0ef4e8d 100644
--- 
a/libcxx/test/std/thread/thread.condition/notify_all_at_thread_exit_lwg3343.pass.cpp
+++ 
b/libcxx/test/std/thread/thread.condition/notify_all_at_thread_exit_lwg3343.pass.cpp
@@ -14,8 +14,8 @@
 // The fix of LWG3343 is done in the dylib. That means Apple backdeployment
 // targets remain broken. Due to the nature of the test, testing on a broken
 // system does not guarantee that the test fails, so the test can't use XFAIL.
-// UNSUPPORTED: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{.+}}
-// UNSUPPORTED: stdlib=apple-libc++ && target={{.+}}-apple-macosx11.{{.+}}
+// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx10.{{.+}}
+// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx11.{{.+}}
 
 // This is a regression test for LWG3343.
 //

diff  --git 
a/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp 
b/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
index c928ba24f1bfe..59cddd406374e 100644
--- a/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
+++ b/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
@@ -11,7 +11,7 @@
 // Aligned allocations are not supported on macOS < 10.13
 // Note: use 'unsupported' instead of 'xfail' to ensure
 // we won't pass prior to c++17.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
 
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 

diff  --git a/libcxx/utils/ci/buildkite-pipeline.yml 
b/libcxx/utils/ci/buildkite-pipeline.yml
index 4bacdec8f8d6b..71d211bfc287d 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -89,8 +89,8 @@ steps:
     <<: *common
 
     # Build with the configuration we use to generate libc++.dylib on Apple 
platforms
-  - label: Apple system
-    command: libcxx/utils/ci/run-buildbot apple-system
+  - label: Apple system configuration
+    command: libcxx/utils/ci/run-buildbot apple-configuration
     agents:
       queue: libcxx-builders
       os: macos

diff  --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index f96fc85906a1f..f1c20b9d72190 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -514,7 +514,7 @@ generic-optimized-speed)
     generate-cmake -C 
"${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-optimized-speed.cmake"
     check-runtimes
 ;;
-apple-system)
+apple-configuration)
     clean
 
     arch="$(uname -m)"

diff  --git a/libcxx/utils/libcxx/test/features.py 
b/libcxx/utils/libcxx/test/features.py
index 28c9c35ae9f87..f93d9ef70e65b 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -359,6 +359,7 @@ def _mingwSupportsModules(cfg):
     "_LIBCPP_HAS_NO_WIDE_CHARACTERS": "no-wide-characters",
     "_LIBCPP_HAS_NO_TIME_ZONE_DATABASE": "no-tzdb",
     "_LIBCPP_HAS_NO_UNICODE": "libcpp-has-no-unicode",
+    "_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS": 
"libcpp-has-no-availability-markup",
     "_LIBCPP_PSTL_BACKEND_LIBDISPATCH": "libcpp-pstl-backend-libdispatch",
 }
 for macro, feature in macros.items():
@@ -580,107 +581,140 @@ def check_gdb(cfg):
     )
 ]
 
-# Define features for back-deployment testing.
-#
-# These features can be used to XFAIL tests that fail when deployed on (or 
compiled
-# for) an older system. For example, if a test exhibits a bug in the libc on a
-# particular system version, or if it uses a symbol that is not available on an
-# older version of the dylib, it can be marked as XFAIL with these features.
-#
-# It is sometimes useful to check that a test fails specifically when compiled 
for a
-# given deployment target. For example, this is the case when testing 
availability
-# markup, where we want to make sure that using the annotated facility on a 
deployment
-# target that doesn't support it will fail at compile time, not at runtime. 
This can
-# be achieved by creating a `.verify.cpp` test that checks for the right 
errors, and
-# mark that test as requiring `stdlib=<vendor>-libc++ && target=<target>`.
-#
-# Since it is not always known which deployment target to pick there are
-# short-hands based on the LLVM version like 
using-built-library-before-llvm-xx.
-# These short-hands make it easy for libc++ developers to select the proper
-# version the feature will be available in and allows vendors to set the proper
-# target information.
+# Helpers to define correspondances between LLVM versions and vendor system 
versions.
+# Those are used for backdeployment features below, do not use directly in 
tests.
 DEFAULT_FEATURES += [
-    # Backdeployment short-hands
     Feature(
-        name="using-built-library-before-llvm-11",
+        name="_target-before-llvm-11",
         when=lambda cfg: BooleanExpression.evaluate(
-            "stdlib=apple-libc++ && 
target={{.+}}-apple-macosx{{(10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0)(.0)?}}",
+            "target={{.+}}-apple-macosx{{(10.13|10.14|10.15)(.0)?}}",
             cfg.available_features,
         ),
     ),
     Feature(
-        name="using-built-library-before-llvm-12",
+        name="_target-before-llvm-12",
         when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-11 || (stdlib=apple-libc++ && 
target={{.+}}-apple-macosx12.{{(0|1|2)}}.0)",
+            "_target-before-llvm-11 || 
target={{.+}}-apple-macosx{{(11(.\d+)?|12.[0-2])(.0)?}}",
             cfg.available_features,
         ),
     ),
-
     Feature(
-        name="using-built-library-before-llvm-13",
+        name="_target-before-llvm-13",
         when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-12 || (stdlib=apple-libc++ && 
target={{.+}}-apple-macosx{{((12.(3|4|5|6|7))|(13.(0|1|2|3)))}}.0)",
+            "_target-before-llvm-12 || 
target={{.+}}-apple-macosx{{(12.[3-7]|13.[0-3])(.0)?}}",
             cfg.available_features,
         ),
     ),
-
     Feature(
-        name="using-built-library-before-llvm-14",
+        name="_target-before-llvm-14",
         when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-13",
+            "_target-before-llvm-13",
             cfg.available_features,
         ),
     ),
-
     Feature(
-        name="using-built-library-before-llvm-15",
+        name="_target-before-llvm-15",
         when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-14 || (stdlib=apple-libc++ && 
target={{.+}}-apple-macosx13.{{(4|5|6)}}.0)",
+            "_target-before-llvm-14 || 
target={{.+}}-apple-macosx{{13.[4-6](.0)?}}",
             cfg.available_features,
         ),
     ),
-
     Feature(
-        name="using-built-library-before-llvm-16",
+        name="_target-before-llvm-16",
         when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-15 || (stdlib=apple-libc++ && 
target={{.+}}-apple-macosx14.{{(0|1|2|3)}}.0)",
+            "_target-before-llvm-15 || 
target={{.+}}-apple-macosx{{12.[0-3](.0)?}}",
             cfg.available_features,
         ),
     ),
-
     Feature(
-        name="using-built-library-before-llvm-17",
+        name="_target-before-llvm-17",
         when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-16",
+            "_target-before-llvm-16",
             cfg.available_features,
         ),
     ),
-
+    # For now, no released version of macOS contains LLVM 18
+    # TODO(ldionne) Please provide the correct value.
     Feature(
-        name="using-built-library-before-llvm-18",
+        name="_target-before-llvm-18",
         when=lambda cfg: BooleanExpression.evaluate(
-            # For now, no released version of macOS contains LLVM 18
-            # TODO(ldionne) Please provide the correct value.
-            "using-built-library-before-llvm-17 || stdlib=apple-libc++ && 
target={{.+}}-apple-macosx{{.+}}",
+            "_target-before-llvm-17 || target={{.+}}-apple-macosx{{.+}}",
             cfg.available_features,
         ),
     ),
-
+    # For now, no released version of macOS contains LLVM 19
+    # TODO(ldionne) Please provide the correct value.
     Feature(
-        name="using-built-library-before-llvm-19",
+        name="_target-before-llvm-19",
         when=lambda cfg: BooleanExpression.evaluate(
-            # For now, no released version of macOS contains LLVM 19
-            # TODO(ldionne) Please provide the correct value.
-            "using-built-library-before-llvm-18 || stdlib=apple-libc++ && 
target={{.+}}-apple-macosx{{.+}}",
+            "_target-before-llvm-18 || target={{.+}}-apple-macosx{{.+}}",
             cfg.available_features,
         ),
     ),
+]
 
-    # Tests that require std::to_chars(floating-point) in the built library
+# Define features for back-deployment testing.
+#
+# These features can be used to XFAIL tests that fail when deployed on (or 
compiled
+# for) an older system. For example, if a test exhibits a bug in the libc++ on 
a
+# particular system version, or if it uses a symbol that is not available on an
+# older version of the dylib, it can be marked as XFAIL with these features.
+#
+# We have two families of Lit features:
+#
+# The first one is `using-built-library-before-llvm-XYZ`. These features 
encode the
+# fact that the test suite is being *run* against a version of the 
shared/static library
+# that predates LLVM version XYZ. This is useful to represent the use case of 
compiling
+# a program against the latest libc++ but then deploying it and running it on 
an older
+# system with an older version of the (usually shared) library.
+#
+# This feature is built up using the target triple passed to the compiler and 
the
+# `stdlib=system` Lit feature, which encodes that we're running against the 
same library
+# as described by the target triple.
+#
+# The second set of features is `availability-<FEATURE>-missing`. This family 
of Lit
+# features encodes the presence of availability markup in the libc++ headers. 
This is
+# useful to check that a test fails specifically when compiled for a given 
deployment
+# target, such as when testing availability markup where we want to make sure 
that
+# using the annotated facility on a deployment target that doesn't support it 
will fail
+# at compile time. This can be achieved by creating a `.verify.cpp` test that 
checks for
+# the right errors and marking the test as `REQUIRES: 
availability-<FEATURE>-missing`.
+#
+# This feature is built up using the presence of availability markup detected 
inside
+# __config, the flavor of the library being tested and the target triple 
passed to the
+# compiler.
+#
+# Note that both families of Lit features are similar but 
diff erent in important ways.
+# For example, tests for availability markup should be expected to produce 
diagnostics
+# regardless of whether we're running against a system library, as long as 
we're using
+# a libc++ flavor that enables availability markup. Similarly, a test could 
fail when
+# run against the system library of an older version of FreeBSD, even though 
FreeBSD
+# doesn't provide availability markup at the time of writing this.
+for version in ("11", "12", "13", "14", "15", "16", "17", "18", "19"):
+    DEFAULT_FEATURES.append(
+        Feature(
+            name="using-built-library-before-llvm-{}".format(version),
+            when=lambda cfg: BooleanExpression.evaluate(
+                "stdlib=system && _target-before-llvm-{}".format(version),
+                cfg.available_features,
+            ),
+        )
+    )
+
+DEFAULT_FEATURES += [
+    # Tests that require std::filesystem support in the built library
     Feature(
-        name="availability-fp_to_chars-missing",
+        name="availability-filesystem-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-13",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{(13|14)(.0)?}})",
+            cfg.available_features,
+        ),
+    ),
+    # Tests that require the C++20 synchronization library (P1135R6 
implemented by https://llvm.org/D68480) in the built library
+    Feature(
+        name="availability-synchronization_library-missing",
+        when=lambda cfg: BooleanExpression.evaluate(
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && 
_target-before-llvm-11)",
             cfg.available_features,
         ),
     ),
@@ -688,7 +722,7 @@ def check_gdb(cfg):
     Feature(
         name="availability-char8_t_support-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-11",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && 
_target-before-llvm-12)",
             cfg.available_features,
         ),
     ),
@@ -696,7 +730,7 @@ def check_gdb(cfg):
     Feature(
         name="availability-verbose_abort-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-13",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && 
_target-before-llvm-13)",
             cfg.available_features,
         ),
     ),
@@ -704,23 +738,23 @@ def check_gdb(cfg):
     Feature(
         name="availability-pmr-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-13",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && 
_target-before-llvm-13)",
             cfg.available_features,
         ),
     ),
-    # Tests that require std::filesystem support in the built library
+    # Tests that require std::to_chars(floating-point) in the built library
     Feature(
-        name="availability-filesystem-missing",
+        name="availability-fp_to_chars-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{(13|14)(.0)?}}",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && 
_target-before-llvm-14)",
             cfg.available_features,
         ),
     ),
-    # Tests that require the C++20 synchronization library (P1135R6 
implemented by https://llvm.org/D68480) in the built library
+    # Tests that require support for <print> and std::print in <ostream> in 
the built library.
     Feature(
-        name="availability-synchronization_library-missing",
+        name="availability-print-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{(13|14|15)(.0)?}}",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && 
_target-before-llvm-18)",
             cfg.available_features,
         ),
     ),
@@ -728,15 +762,7 @@ def check_gdb(cfg):
     Feature(
         name="availability-tzdb-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-19",
-            cfg.available_features,
-        ),
-    ),
-    # Tests that require support for <print> and std::print in <ostream> in 
the built library.
-    Feature(
-        name="availability-print-missing",
-        when=lambda cfg: BooleanExpression.evaluate(
-            "using-built-library-before-llvm-18",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && 
_target-before-llvm-19)",
             cfg.available_features,
         ),
     ),

diff  --git a/libcxx/utils/libcxx/test/params.py 
b/libcxx/utils/libcxx/test/params.py
index 4c8590a2135d9..ea841acf3a3d4 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -264,6 +264,19 @@ def getSuitableClangTidy(cfg):
             ],
         ),
     ),
+    Parameter(
+        name="using_system_stdlib",
+        choices=[True, False],
+        type=bool,
+        default=False,
+        help="""Whether the Standard Library being tested is the one that 
shipped with the system by default.
+
+                This is 
diff erent from the 'stdlib' parameter, which describes the flavor of libc++ 
being
+                tested. 'using_system_stdlib' describes whether the target 
system passed with 'target_triple'
+                also corresponds to the version of the library being tested.
+             """,
+        actions=lambda is_system: [AddFeature("stdlib=system")] if is_system 
else [],
+    ),
     Parameter(
         name="enable_warnings",
         choices=[True, False],

diff  --git a/libcxxabi/test/catch_function_01.pass.cpp 
b/libcxxabi/test/catch_function_01.pass.cpp
index 750af346ab282..4ca42f8bd7a41 100644
--- a/libcxxabi/test/catch_function_01.pass.cpp
+++ b/libcxxabi/test/catch_function_01.pass.cpp
@@ -14,7 +14,7 @@
 // UNSUPPORTED: no-exceptions
 
 // 65ace9daa360 made it in the dylib in macOS 10.11
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10}}
 
 #include <cassert>
 

diff  --git a/libcxxabi/test/catch_function_03.pass.cpp 
b/libcxxabi/test/catch_function_03.pass.cpp
index e353d0e71c064..3f9e4fcb2e02a 100644
--- a/libcxxabi/test/catch_function_03.pass.cpp
+++ b/libcxxabi/test/catch_function_03.pass.cpp
@@ -11,7 +11,7 @@
 // UNSUPPORTED: no-exceptions
 
 // Support for catching a function pointer including noexcept was shipped in 
macOS 10.13
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
 
 #include <cassert>
 

diff  --git a/libcxxabi/test/catch_member_data_pointer_01.pass.cpp 
b/libcxxabi/test/catch_member_data_pointer_01.pass.cpp
index 5e5fb60f61b6e..86313cec014c8 100644
--- a/libcxxabi/test/catch_member_data_pointer_01.pass.cpp
+++ b/libcxxabi/test/catch_member_data_pointer_01.pass.cpp
@@ -9,7 +9,7 @@
 // UNSUPPORTED: no-exceptions
 
 // 1b00fc5d8133 made it in the dylib in macOS 10.11
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10}}
 
 #include <cassert>
 

diff  --git a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp 
b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp
index b4b8ce8234990..9e6790b0abfb1 100644
--- a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp
+++ b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp
@@ -11,7 +11,7 @@
 // UNSUPPORTED: no-exceptions
 
 // Support for catching a function pointer including noexcept was shipped in 
macOS 10.13
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
 
 // GCC supports noexcept function types but this test still fails.
 // This is likely a bug in their implementation. Investigation needed.

diff  --git a/libcxxabi/test/catch_member_pointer_nullptr.pass.cpp 
b/libcxxabi/test/catch_member_pointer_nullptr.pass.cpp
index 70d3afc7c75e7..a476386f6db84 100644
--- a/libcxxabi/test/catch_member_pointer_nullptr.pass.cpp
+++ b/libcxxabi/test/catch_member_pointer_nullptr.pass.cpp
@@ -8,7 +8,7 @@
 
 // Catching an exception thrown as nullptr was not properly handled before
 // 2f984cab4fa7, which landed in macOS 10.13
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
 
 // UNSUPPORTED: no-exceptions
 

diff  --git a/libcxxabi/test/catch_multi_level_pointer.pass.cpp 
b/libcxxabi/test/catch_multi_level_pointer.pass.cpp
index 5f0e78a391b14..244056871855c 100644
--- a/libcxxabi/test/catch_multi_level_pointer.pass.cpp
+++ b/libcxxabi/test/catch_multi_level_pointer.pass.cpp
@@ -9,7 +9,7 @@
 // UNSUPPORTED: no-exceptions
 
 // 1b00fc5d8133 made it in the dylib in macOS 10.11
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10}}
 
 // mps2-an385 machine used for testing of picolibc has just 4 MB of "flash"
 // memory and this test requires almost 5 MB

diff  --git a/libcxxabi/test/catch_null_pointer_to_object_pr64953.pass.cpp 
b/libcxxabi/test/catch_null_pointer_to_object_pr64953.pass.cpp
index 82ce0c5803099..d0f719685da75 100644
--- a/libcxxabi/test/catch_null_pointer_to_object_pr64953.pass.cpp
+++ b/libcxxabi/test/catch_null_pointer_to_object_pr64953.pass.cpp
@@ -34,8 +34,8 @@
 // XPASS here so that we have to make these UNSUPPORTED for now (they should be
 // XFAILs when tested against current [macOS14] and previous installed 
libc++abi
 // as described above).
-// UNSUPPORTED: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}{{.*}}
-// UNSUPPORTED: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx{{11|12|13|14}}{{.*}}
+// UNSUPPORTED: stdlib=system && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}{{.*}}
+// UNSUPPORTED: stdlib=system && 
target={{.+}}-apple-macosx{{11|12|13|14}}{{.*}}
 
 #include <exception>
 #include <stdlib.h>

diff  --git a/libcxxabi/test/catch_pointer_nullptr.pass.cpp 
b/libcxxabi/test/catch_pointer_nullptr.pass.cpp
index 29398f05d7e89..473a703988bcf 100644
--- a/libcxxabi/test/catch_pointer_nullptr.pass.cpp
+++ b/libcxxabi/test/catch_pointer_nullptr.pass.cpp
@@ -8,7 +8,7 @@
 
 // Catching an exception thrown as nullptr was not properly handled before
 // 2f984cab4fa7, which landed in macOS 10.13
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
 
 // UNSUPPORTED: c++03
 // UNSUPPORTED: no-exceptions

diff  --git a/libcxxabi/test/catch_ptr_02.pass.cpp 
b/libcxxabi/test/catch_ptr_02.pass.cpp
index c7ef28a976f88..2b22ad71b5a04 100644
--- a/libcxxabi/test/catch_ptr_02.pass.cpp
+++ b/libcxxabi/test/catch_ptr_02.pass.cpp
@@ -14,7 +14,7 @@
 // ADDITIONAL_COMPILE_FLAGS: -Wno-exceptions
 
 // The fix for PR17222 made it in the dylib for macOS 10.10
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.9
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.9
 
 #include <cassert>
 #include <stdint.h>

diff  --git a/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in 
b/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in
index 2e9472163b9d5..9e725c523f29b 100644
--- a/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in
+++ b/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in
@@ -56,6 +56,7 @@ config.substitutions.append(('%{exec}',
 ))
 
 config.stdlib = 'apple-libc++'
+config.using_system_stdlib = True
 
 libcxx.test.config.configure(
     libcxx.test.params.DEFAULT_PARAMETERS + BACKDEPLOYMENT_PARAMETERS,

diff  --git a/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp 
b/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp
index a4a2bbd99e6e2..c013327f7b751 100644
--- a/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp
+++ b/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp
@@ -9,7 +9,7 @@
 // UNSUPPORTED: no-exceptions
 
 // PR41395 isn't fixed until the dylib shipped with macOS 10.15
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 #include "cxxabi.h"
 #include <new>

diff  --git a/libcxxabi/test/dynamic_cast.pass.cpp 
b/libcxxabi/test/dynamic_cast.pass.cpp
index 6b97afb553b3c..19d5aab454c55 100644
--- a/libcxxabi/test/dynamic_cast.pass.cpp
+++ b/libcxxabi/test/dynamic_cast.pass.cpp
@@ -7,10 +7,10 @@
 
//===----------------------------------------------------------------------===//
 
 // PR33425 and PR33487 are not fixed until the dylib shipped with macOS 10.15
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.14
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.14
 
 // PR33439 isn't fixed until the dylib shipped with macOS 10.14
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13}}
 
 #include <cassert>
 

diff  --git a/libcxxabi/test/exception_object_alignment.pass.cpp 
b/libcxxabi/test/exception_object_alignment.pass.cpp
index f0d49faf6ee0b..9de59b96d9a35 100644
--- a/libcxxabi/test/exception_object_alignment.pass.cpp
+++ b/libcxxabi/test/exception_object_alignment.pass.cpp
@@ -12,7 +12,7 @@
 // before macOS 10.14. The test fails on macOS 10.9 to 10.12, passes on macOS
 // 10.13 (no investigation done), and passes afterwards. Just mark all the OSes
 // before 10.14 as unsupported.
-// UNSUPPORTED: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13}}
+// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13}}
 
 // Check that the pointer __cxa_allocate_exception returns is aligned to the
 // default alignment for the target architecture.

diff  --git a/libcxxabi/test/forced_unwind1.pass.cpp 
b/libcxxabi/test/forced_unwind1.pass.cpp
index 1e94eb971be08..cb14fcf71bb89 100644
--- a/libcxxabi/test/forced_unwind1.pass.cpp
+++ b/libcxxabi/test/forced_unwind1.pass.cpp
@@ -15,8 +15,8 @@
 // UNSUPPORTED: target={{ve-.*}}
 
 // These tests fail on previously released dylibs, investigation needed.
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{11.0|12.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{11.0|12.0}}
 
 #include <stdlib.h>
 #include <string.h>

diff  --git a/libcxxabi/test/forced_unwind2.pass.cpp 
b/libcxxabi/test/forced_unwind2.pass.cpp
index 65f5d5dd2e05c..6ec27e4a65557 100644
--- a/libcxxabi/test/forced_unwind2.pass.cpp
+++ b/libcxxabi/test/forced_unwind2.pass.cpp
@@ -14,8 +14,8 @@
 // UNSUPPORTED: target={{ve-.*}}
 
 // These tests fail on previously released dylibs, investigation needed.
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{11.0|12.0}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{11.0|12.0}}
 
 #include <exception>
 #include <stdlib.h>

diff  --git a/libcxxabi/test/incomplete_type.sh.cpp 
b/libcxxabi/test/incomplete_type.sh.cpp
index fbe6f0366e8e8..fc26227b8bdc5 100644
--- a/libcxxabi/test/incomplete_type.sh.cpp
+++ b/libcxxabi/test/incomplete_type.sh.cpp
@@ -17,7 +17,7 @@
 // UNSUPPORTED: no-rtti
 
 // The fix for PR25898 landed in the system dylibs in macOS 10.13
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
 
 // RUN: %{cxx} %{flags} %{compile_flags} -Wno-unreachable-code -c %s -o 
%t.one.o
 // RUN: %{cxx} %{flags} %{compile_flags} -Wno-unreachable-code -c %s -o 
%t.two.o -DTU_ONE

diff  --git a/libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp 
b/libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp
index f29a64b0c8fe4..b65d8b5d33929 100644
--- a/libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp
+++ b/libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp
@@ -10,7 +10,7 @@
 
 // ___cxa_throw_bad_array_new_length is re-exported from libc++ only starting
 // in macosx 10.15
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 #include <cxxabi.h>
 #include <new>

diff  --git a/libcxxabi/test/test_demangle.pass.cpp 
b/libcxxabi/test/test_demangle.pass.cpp
index 88637b84de016..1435c879d383d 100644
--- a/libcxxabi/test/test_demangle.pass.cpp
+++ b/libcxxabi/test/test_demangle.pass.cpp
@@ -7,15 +7,15 @@
 
//===----------------------------------------------------------------------===//
 
 // The demangler does not pass all these tests with the system dylibs on macOS.
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
 
 // This test is too big for most embedded devices.
 // XFAIL: LIBCXX-PICOLIBC-FIXME
 
 // https://llvm.org/PR51407 was not fixed in some previously-released
 // demanglers, which causes them to run into the infinite loop.
-// UNSUPPORTED: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
-// UNSUPPORTED: stdlib=apple-libc++ && target={{.+}}-apple-macosx11.0
+// UNSUPPORTED: stdlib=system && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
+// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx11.0
 
 // Android's long double on x86[-64] is (64/128)-bits instead of Linux's usual
 // 80-bit format, and this demangling test is failing on it.

diff  --git a/libcxxabi/test/test_exception_address_alignment.pass.cpp 
b/libcxxabi/test/test_exception_address_alignment.pass.cpp
index 62999134b3fd3..80d42854c87b7 100644
--- a/libcxxabi/test/test_exception_address_alignment.pass.cpp
+++ b/libcxxabi/test/test_exception_address_alignment.pass.cpp
@@ -13,7 +13,7 @@
 // an incorrectly aligned _Unwind_Exception type on non-ARM. That causes these
 // tests to fail when running against a system libc++abi and libunwind that was
 // compiled with an incorrect definition of _Unwind_Exception.
-// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
 
 // Test that the address of the exception object is properly aligned as 
required
 // by the relevant ABI

diff  --git a/libcxxabi/test/uncaught_exception.pass.cpp 
b/libcxxabi/test/uncaught_exception.pass.cpp
index 9087059aeba54..54882862e7285 100644
--- a/libcxxabi/test/uncaught_exception.pass.cpp
+++ b/libcxxabi/test/uncaught_exception.pass.cpp
@@ -15,8 +15,8 @@
 // to undefined symbols when linking against a libc++ that re-exports the 
symbols,
 // but running against a libc++ that doesn't. Fortunately, usage of 
__cxa_uncaught_exception()
 // in the wild seems to be close to non-existent.
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx{{(11|12|13|14)([.][0-9]+)?}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
+// XFAIL: stdlib=system && 
target={{.+}}-apple-macosx{{(11|12|13|14)([.][0-9]+)?}}
 
 #include <cxxabi.h>
 #include <cassert>

diff  --git a/libcxxabi/test/uncaught_exceptions.pass.cpp 
b/libcxxabi/test/uncaught_exceptions.pass.cpp
index bd679e7abc1f8..cf76dc12e5e79 100644
--- a/libcxxabi/test/uncaught_exceptions.pass.cpp
+++ b/libcxxabi/test/uncaught_exceptions.pass.cpp
@@ -9,7 +9,7 @@
 // UNSUPPORTED: no-exceptions
 
 // __cxa_uncaught_exceptions is not re-exported from libc++ until macOS 10.15.
-// XFAIL: stdlib=apple-libc++ && 
target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
 
 #include <cxxabi.h>
 #include <cassert>

diff  --git a/libunwind/test/configs/apple-libunwind-backdeployment.cfg.in 
b/libunwind/test/configs/apple-libunwind-backdeployment.cfg.in
index 4484573801bd2..013c43ae78001 100644
--- a/libunwind/test/configs/apple-libunwind-backdeployment.cfg.in
+++ b/libunwind/test/configs/apple-libunwind-backdeployment.cfg.in
@@ -55,6 +55,7 @@ config.substitutions.append(('%{exec}',
 ))
 
 config.stdlib = 'apple-libc++'
+config.using_system_stdlib = True
 
 import os, site
 import libcxx.test.params, libcxx.test.config

diff  --git a/libunwind/test/libunwind_01.pass.cpp 
b/libunwind/test/libunwind_01.pass.cpp
index 96f12d1fc3937..838df6b589720 100644
--- a/libunwind/test/libunwind_01.pass.cpp
+++ b/libunwind/test/libunwind_01.pass.cpp
@@ -8,7 +8,7 @@
 
//===----------------------------------------------------------------------===//
 
 // TODO: Investigate this failure on x86_64 macOS back deployment
-// XFAIL: stdlib=apple-libc++ && 
target=x86_64-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
+// XFAIL: stdlib=system && 
target=x86_64-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
 
 // TODO: Figure out why this fails with Memory Sanitizer.
 // XFAIL: msan


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to