[libcxx-commits] [libcxx] [libcxxabi] [llvm] [libc++] Clean up and update deployment target features (PR #96312)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 26 08:30:50 PDT 2024


https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/96312

>From 4b4ed2779bb2a5ffac05d56ce3d297f6bfa99568 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Tue, 18 Jun 2024 13:05:11 -0400
Subject: [PATCH 01/12] [libc++] Clean up and update deployment target features

This patch removes many annotations that are not relevant anymore since
we don't support or test back-deploying to macOS < 10.13. It also cleans
up raw usage of target triples to identify versions of dylibs shipped on
prior versions of macOS, and uses the target-agnostic Lit features instead.

Fixes #80901
---
 .../basic.string/string.capacity/PR53170.pass.cpp |  4 ++--
 .../string.capacity/allocation_size.pass.cpp      |  5 +++--
 ...02_notify_from_pthread_created_thread.pass.cpp |  3 ---
 .../thread.thread.this/sleep_for.pass.cpp         |  5 -----
 .../thread.thread.this/sleep_for.signals.pass.cpp |  5 -----
 .../stdlib_h.aligned_alloc.compile.pass.cpp       |  2 +-
 .../generic_category.pass.cpp                     |  2 --
 .../system_category.pass.cpp                      |  2 --
 .../directory_entry.mods/refresh.pass.cpp         |  4 ++--
 .../directory_entry.obs/file_size.pass.cpp        |  4 ++--
 .../directory_entry.obs/hard_link_count.pass.cpp  |  4 ++--
 .../directory_entry.obs/last_write_time.pass.cpp  |  4 ++--
 .../fs.op.copy_file/copy_file.pass.cpp            |  4 ++--
 .../create_directories.pass.cpp                   |  4 ++--
 .../create_directory.pass.cpp                     |  4 ++--
 .../create_directory_with_attributes.pass.cpp     |  4 ++--
 .../fs.op.file_size/file_size.pass.cpp            |  4 ++--
 .../last_write_time.pass.cpp                      |  4 ++--
 .../fs.op.funcs/fs.op.remove_all/toctou.pass.cpp  |  6 ++----
 .../istream.formatted.arithmetic/bool.pass.cpp    |  3 ++-
 .../istream.formatted.arithmetic/double.pass.cpp  |  3 ++-
 .../istream.formatted.arithmetic/float.pass.cpp   |  3 ++-
 .../istream.formatted.arithmetic/int.pass.cpp     |  3 ++-
 .../istream.formatted.arithmetic/long.pass.cpp    |  3 ++-
 .../long_double.pass.cpp                          |  3 ++-
 .../long_long.pass.cpp                            |  3 ++-
 .../istream.formatted.arithmetic/pointer.pass.cpp |  3 ++-
 .../istream.formatted.arithmetic/short.pass.cpp   |  3 ++-
 .../unsigned_int.pass.cpp                         |  3 ++-
 .../unsigned_long.pass.cpp                        |  3 ++-
 .../unsigned_long_long.pass.cpp                   |  3 ++-
 .../unsigned_short.pass.cpp                       |  3 ++-
 .../istream_extractors/streambuf.pass.cpp         |  3 ++-
 .../istream.unformatted/get.pass.cpp              |  3 ++-
 .../istream.unformatted/get_chart.pass.cpp        |  3 ++-
 .../istream.unformatted/get_pointer_size.pass.cpp |  3 ++-
 .../get_pointer_size_chart.pass.cpp               |  3 ++-
 .../istream.unformatted/get_streambuf.pass.cpp    |  3 ++-
 .../get_streambuf_chart.pass.cpp                  |  3 ++-
 .../getline_pointer_size.pass.cpp                 |  3 ++-
 .../getline_pointer_size_chart.pass.cpp           |  3 ++-
 .../istream.unformatted/ignore.pass.cpp           |  3 ++-
 .../istream.unformatted/peek.pass.cpp             |  3 ++-
 .../istream.unformatted/read.pass.cpp             |  3 ++-
 .../istream.unformatted/seekg_off.pass.cpp        |  2 --
 .../minmax_showbase.pass.cpp                      |  4 ++--
 .../ostream.inserters.arithmetic/minus1.pass.cpp  |  2 --
 .../ios.types/ios_Init/ios_Init.multiple.pass.cpp |  5 ++---
 ...sized_delete_array_fsizeddeallocation.pass.cpp |  1 -
 .../sized_delete_fsizeddeallocation.pass.cpp      |  1 -
 .../uncaught/uncaught_exceptions.pass.cpp         |  9 +++------
 .../cstdlib.aligned_alloc.compile.pass.cpp        |  2 +-
 .../ctime.timespec.compile.pass.cpp               |  2 +-
 .../std/localization/codecvt_unicode.pass.cpp     |  4 +++-
 .../facet.ctype.char.statics/table_size.pass.cpp  |  5 ++---
 .../facet.num.get.members/get_long.pass.cpp       |  6 +++---
 .../locale/locale.cons/name_construction.pass.cpp |  6 +++---
 .../std/numerics/rand/rand.device/ctor.pass.cpp   |  7 ++-----
 .../string.capacity/max_size.pass.cpp             |  7 ++++---
 .../string.capacity/over_max_size.pass.cpp        |  5 ++---
 .../string.capacity/reserve_size.pass.cpp         |  6 +++---
 .../futures.async/async_race.38682.pass.cpp       |  6 +++---
 .../futures/futures.future_error/what.pass.cpp    |  5 -----
 .../notify_all_at_thread_exit_lwg3343.pass.cpp    | 10 +++++-----
 .../memory/temporary.buffer/overaligned.pass.cpp  |  5 -----
 libcxx/utils/libcxx/test/features.py              |  9 ++++++++-
 libcxxabi/test/catch_function_01.pass.cpp         |  6 ++----
 libcxxabi/test/catch_function_03.pass.cpp         |  3 ---
 .../test/catch_member_data_pointer_01.pass.cpp    |  3 ---
 .../catch_member_function_pointer_02.pass.cpp     |  3 ---
 .../test/catch_member_pointer_nullptr.pass.cpp    |  4 ----
 libcxxabi/test/catch_multi_level_pointer.pass.cpp |  3 ---
 .../catch_null_pointer_to_object_pr64953.pass.cpp | 15 ++++-----------
 libcxxabi/test/catch_pointer_nullptr.pass.cpp     |  4 ----
 libcxxabi/test/catch_ptr_02.pass.cpp              |  3 ---
 .../test/cxa_vec_new_overflow_PR41395.pass.cpp    |  4 ++--
 libcxxabi/test/dynamic_cast.pass.cpp              |  7 ++-----
 .../test/exception_object_alignment.pass.cpp      |  6 ------
 libcxxabi/test/incomplete_type.sh.cpp             |  3 ---
 .../test/test_aux_runtime_op_array_new.pass.cpp   |  4 ++--
 libcxxabi/test/test_demangle.pass.cpp             |  6 +-----
 .../test_exception_address_alignment.pass.cpp     |  6 ------
 libcxxabi/test/uncaught_exception.pass.cpp        |  3 +--
 libcxxabi/test/uncaught_exceptions.pass.cpp       |  5 +++--
 84 files changed, 142 insertions(+), 204 deletions(-)

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 2b46d4bc2fb08..e7b775068c54b 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
@@ -21,8 +21,8 @@
 //
 // Reported as https://llvm.org/PR53170.
 
-// reserve(n) used to shrink the string until https://llvm.org/D117332 was shipped.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
+// reserve(n) used to shrink the string until https://llvm.org/D117332 was shipped in LLVM 14.
+// XFAIL: using-built-library-before-llvm-14
 
 #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 750e7b165723d..6f127e1b62b02 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,12 +6,13 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.13|10.14|10.15|11.0}}
-
 // <string>
 
 // This test demonstrates the smaller allocation sizes when the alignment
 // requirements of std::string are dropped from 16 to 8.
+//
+// XFAIL: using-built-library-before-llvm-19
+
 #include <algorithm>
 #include <cassert>
 #include <cstddef>
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 b7652b074bde8..66251648bd50c 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
@@ -13,9 +13,6 @@
 // unique_lock.
 // UNSUPPORTED: c++03
 
-// PR30202 was fixed starting in macosx10.13.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
-
 // <condition_variable>
 
 // void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
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 6f08dde2f3132..e64a873fa095f 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
@@ -8,11 +8,6 @@
 
 // UNSUPPORTED: no-threads
 
-// 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=system && target={{.+}}-apple-macosx10.{{9|10|11}}
-
 // ALLOW_RETRIES: 3
 
 // <thread>
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 12376695fac34..1dba5d8a40976 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
@@ -11,11 +11,6 @@
 // This test uses the POSIX header <sys/time.h> which Windows doesn't provide
 // UNSUPPORTED: windows
 
-// 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=system && target={{.+}}-apple-macosx10.{{9|10|11}}
-
 // ALLOW_RETRIES: 3
 
 // <thread>
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 7ddf03fff4f4e..aec2c7f98af75 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: target={{.+}}-apple-macosx10.{{(13|14)(.0)?}}
 
 // ::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 35c2726fda2a0..5425203304014 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,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
-
 // <system_error>
 
 // class error_category
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 0f622289248b7..6ba33ba44ca4c 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,8 +12,6 @@
 
 // const error_category& system_category();
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
-
 #include <system_error>
 #include <cassert>
 #include <string>
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 f2d5e7dd0e563..20a545b719ed6 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
@@ -10,8 +10,8 @@
 // UNSUPPORTED: c++03, c++11, c++14
 
 // The string reported on errors changed, which makes those tests fail when run
-// against already-released libc++'s.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
+// against a built library that doesn't contain 0aa637b2037d.
+// XFAIL: using-built-library-before-llvm-13
 
 // <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 11295855d3ca0..10829f8a73db1 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
@@ -10,8 +10,8 @@
 // UNSUPPORTED: c++03, c++11, c++14
 
 // The string reported on errors changed, which makes those tests fail when run
-// against already-released libc++'s.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
+// against a built library that doesn't contain 0aa637b2037d.
+// XFAIL: using-built-library-before-llvm-13
 
 // 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 f40b06e106e12..5d931891dd0eb 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
@@ -10,8 +10,8 @@
 // UNSUPPORTED: c++03, c++11, c++14
 
 // The string reported on errors changed, which makes those tests fail when run
-// against already-released libc++'s.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
+// against a built library that doesn't contain 0aa637b2037d.
+// XFAIL: using-built-library-before-llvm-13
 
 // 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 72039bb06921f..82b94a3d6bf5f 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
@@ -10,8 +10,8 @@
 // UNSUPPORTED: c++03, c++11, c++14
 
 // The string reported on errors changed, which makes those tests fail when run
-// against already-released libc++'s.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
+// against a built library that doesn't contain 0aa637b2037d.
+// XFAIL: using-built-library-before-llvm-13
 
 // <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 3209e16d00612..5a80c2eb26664 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
@@ -11,8 +11,8 @@
 // UNSUPPORTED: availability-filesystem-missing
 
 // The string reported on errors changed, which makes those tests fail when run
-// against already-released libc++'s.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
+// against a built library that doesn't contain 0aa637b2037d.
+// XFAIL: using-built-library-before-llvm-13
 
 // 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 3658a24b72b28..daaa7cddd7086 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
@@ -11,8 +11,8 @@
 // UNSUPPORTED: no-filesystem
 // UNSUPPORTED: availability-filesystem-missing
 
-// This test requires the dylib support introduced in D92769.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
+// This test requires the dylib support introduced in e4ed349c7658.
+// XFAIL: using-built-library-before-llvm-12
 
 // <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 cdedf0d461260..eff68839dd9fc 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
@@ -11,8 +11,8 @@
 // UNSUPPORTED: no-filesystem
 // UNSUPPORTED: availability-filesystem-missing
 
-// This test requires the dylib support introduced in http://llvm.org/D92769.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
+// This test requires the dylib support introduced in e4ed349c7658.
+// XFAIL: using-built-library-before-llvm-12
 
 // <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 dee6690997fb1..f7e6e2e15d3e3 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
@@ -11,8 +11,8 @@
 // UNSUPPORTED: no-filesystem
 // UNSUPPORTED: availability-filesystem-missing
 
-// This test requires the dylib support introduced in http://llvm.org/D92769.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
+// This test requires the dylib support introduced in e4ed349c7658.
+// XFAIL: using-built-library-before-llvm-12
 
 // <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 648598bb10124..30d1cc7649e2e 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
@@ -12,8 +12,8 @@
 // UNSUPPORTED: availability-filesystem-missing
 
 // The string reported on errors changed, which makes those tests fail when run
-// against already-released libc++'s.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
+// against a built library that doesn't contain 0aa637b2037d.
+// XFAIL: using-built-library-before-llvm-13
 
 // <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 459224d41953a..c1816a94fd2b6 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
@@ -12,8 +12,8 @@
 // UNSUPPORTED: availability-filesystem-missing
 
 // The string reported on errors changed, which makes those tests fail when run
-// against already-released libc++'s.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
+// against a built library that doesn't contain 0aa637b2037d.
+// XFAIL: using-built-library-before-llvm-13
 
 // <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 5335f8070ffa4..abdfe8a87bff7 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
@@ -29,11 +29,9 @@
 //
 // This is taken from https://github.com/rust-lang/wg-security-response/blob/master/patches/CVE-2022-21658/0002-Fix-CVE-2022-21658-for-UNIX-like.patch
 
-// This test requires a dylib containing the fix shipped in https://reviews.llvm.org/D118134.
+// This test requires a dylib containing the fix shipped in https://reviews.llvm.org/D118134 (4f67a909902d).
 // We use UNSUPPORTED instead of XFAIL because the test might not fail reliably.
-// 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}}
+// UNSUPPORTED: using-built-library-before-llvm-14
 
 // 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 4e915d340b31b..d04afe8da7272 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 c7f2476cf82f0..13ff797c215b7 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 1acc771a6af11..d859274a1b362 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 dfd26975840ee..c15ef42ede16c 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 440afad4afb1b..e546769dc1f34 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 49a2c3d5eb66b..ce3626577fe69 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 1f2aee746c87c..e60432dda618a 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 df467c98f793c..9085062bd757c 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 3530cd9adfa22..8da1a0c8aa24c 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 3240b482b813e..401dfe3462bc2 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 ba6dc22cacb4c..223feb2b99b9e 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 453d17ed31c5b..c9af972fb550e 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 70075760c57bf..3003660cb14f0 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 66a60c15ac060..2dddf8344fc9a 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 068b70818aa1d..9c793c922c473 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 dce6ba770b4e0..564cd63c8cd58 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 ab8d1f7e7d611..f46055c0fc3e7 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,8 @@
 
 // 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 54873944af6a4..7c9d9d99aeb99 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,8 @@
 
 // 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 7290236a90584..7468295fac24f 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 3d8cbf59e3298..ccf6d63b9afec 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 6518469d8aa4e..a55bdf807cec0 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,8 @@
 
 // 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 86fd5a656733b..76db68d67d4d7 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,8 @@
 
 // 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 0a853672cebed..6befb5983fe05 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 45eab0ce28e48..e7caf8adc27ce 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 ba884e0a67b8a..8a8aec5246931 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,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// Requires 396145d in the built library.
+// XFAIL: using-built-library-before-llvm-10
 
 // <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 5af9bda9c6f30..8126fe4401af3 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,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
-
 // <istream>
 
 // basic_istream<charT,traits>& seekg(off_type off, ios_base::seekdir dir);
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 bef2b071c8437..06353a44ec41b 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
@@ -24,8 +24,8 @@
 //  using std::showbase
 
 // 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=system && target={{.+}}-apple-macosx10.{{12|13|14}}
+// shipped before we landed D32670. See D32670 for details.
+// XFAIL: using-built-library-before-llvm-10
 
 #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 34c143ac14495..65d3930d82336 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,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.12
-
 // <ostream>
 
 // template <class charT, class traits = char_traits<charT> >
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 1d8fecf34529a..fab1b39940a86 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
@@ -14,9 +14,8 @@
 // Test to make sure that the streams only get initialized once
 // Taken from https://llvm.org/PR43300
 
-// The dylibs shipped on macOS so far do not contain the fix for PR43300, so
-// this test fails.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// This test requires the fix for PR43300 (7b81a13bfcd1).
+// XFAIL: using-built-library-before-llvm-10
 
 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 563f8bb2c8f32..6077318278a1b 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,6 @@
 // when sized deallocation is not supported, e.g., prior to C++14.
 
 // UNSUPPORTED: sanitizer-new-delete
-// 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 d9d8e038784a8..ff88662d20875 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,6 @@
 // when sized deallocation is not supported, e.g., prior to C++14.
 
 // UNSUPPORTED: sanitizer-new-delete
-// 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 e8a36a92e43ef..64d1be9fb5ed8 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
@@ -8,12 +8,9 @@
 
 // UNSUPPORTED: no-exceptions
 
-// std::uncaught_exceptions() was introduced in the dylib on Mac OS 10.12
-// 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=system && target={{.+}}-apple-macosx10.{{12|13}}
+// std::uncaught_exceptions() gives the wrong answer in older versions
+// of the dylib, where it only gives 0 or 1. This was fixed later.
+// XFAIL: using-built-library-before-llvm-10
 
 // 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 da04d9f2dc0ff..67eef7da413b7 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: target={{.+}}-apple-macosx10.{{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 87957afc4206e..b7fd892003e2d 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// XFAIL: target={{.+}}-apple-macosx10.{{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 a434a22ff96ba..e54c0c2a4610a 100644
--- a/libcxx/test/std/localization/codecvt_unicode.pass.cpp
+++ b/libcxx/test/std/localization/codecvt_unicode.pass.cpp
@@ -7,7 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
-// 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}}
+
+// Requires the fix in 390840f.
+// XFAIL: using-built-library-before-llvm-18
 
 #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 05536053825bc..a584567b2539b 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
@@ -12,10 +12,9 @@
 
 // Make sure we can reference std::ctype<char>::table_size.
 
-// Before https://llvm.org/D110647, the shared library did not contain
+// Before https://llvm.org/D110647 (049f6c29a6f0), the shared library did not contain
 // std::ctype<char>::table_size, so this test fails with a link error.
-// 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}}
+// XFAIL: using-built-library-before-llvm-14
 
 #include <locale>
 #include <cassert>
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 68c8789f92f24..f1f1e878a104f 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
@@ -13,9 +13,9 @@
 // iter_type get(iter_type in, iter_type end, ios_base&,
 //               ios_base::iostate& err, long& v) const;
 
-// This test exercises the fix for PR28704, which isn't in the dylib for
-// some systems.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// This test exercises the fix for http://llvm.org/PR28704 (2dda1ff), which
+// isn't in the dylib for some systems.
+// XFAIL: using-built-library-before-llvm-10
 
 #include <locale>
 #include <ios>
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 d7be7e0f95a50..7881a2ba96717 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
@@ -16,9 +16,9 @@
 // locale(const locale& other, const string& std_name, category cat);
 // locale(const locale& other, const locale& one, category cats);
 
-// This test exercises the fix for locale name construction (D119441), which
-// isn't in the dylib for some systems.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
+// This test exercises the fix for locale name construction (http://llvm.org/D119441 aka 643b7bcdb404),
+// which isn't in the dylib for some systems.
+// XFAIL: using-built-library-before-llvm-17
 
 #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 a9583be73af00..6db61479e041f 100644
--- a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
@@ -6,12 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-// See https://llvm.org/PR20183
-// 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=system && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
+// https://llvm.org/D116045 (d202c76441e1).
+// XFAIL: target={{.+}}-apple-{{.+}} && using-built-library-before-llvm-14
 
 // 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 e5e04c27a8e50..b9ffffc0993af 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
@@ -8,10 +8,11 @@
 
 // UNSUPPORTED: no-exceptions
 
-// 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.
+// 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 a dylib that doesn't contain 04ce0ba.
 //
-// XFAIL: using-built-library-before-llvm-18
+// XFAIL: using-built-library-before-llvm-19
 
 // <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 eb8e003b51976..9ef604cb92aae 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,11 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: no-exceptions
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
 
-// Prior to http://llvm.org/D123580, there was a bug with how the max_size()
+// Prior to http://llvm.org/D123580 (29c8c070a177), 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=system && target=arm64-apple-macosx{{11.0|12.0}}
+// XFAIL: using-built-library-before-llvm-15
 
 // <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 f466dbd05e747..6196fd6836e7d 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
@@ -10,9 +10,9 @@
 
 // void reserve(size_type res_arg); // constexpr since C++20
 
-// This test relies on https://llvm.org/PR45368 being fixed, which isn't in
-// older Apple dylibs
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
+// This test relies on https://llvm.org/PR45368 (841132e) being fixed, which isn't in
+// older Apple dylibs.
+// XFAIL: using-built-library-before-llvm-12
 
 #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 64ff0e76ff2d0..f6bc1286eb394 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
@@ -9,9 +9,9 @@
 // UNSUPPORTED: no-threads
 // UNSUPPORTED: c++03
 
-// 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// This test requires the fix for http://llvm.org/PR38682 (616ef1863fae). We mark the
+// test as UNSUPPORTED instead of XFAIL because the test doesn't fail consistently.
+// UNSUPPORTED: using-built-library-before-llvm-10
 
 // 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 05781c24e45b5..87d056f6309dc 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
@@ -8,11 +8,6 @@
 //
 // UNSUPPORTED: no-threads
 
-// 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=system && target={{.+}}-apple-macosx10.{{9|10|11}}
-
 // VC Runtime's std::exception::what() method is not marked as noexcept, so
 // this fails.
 // UNSUPPORTED: target=x86_64-pc-windows-msvc
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 c1c1ab0ef4e8d..61094eced4cb2 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
@@ -11,11 +11,11 @@
 // notify_all_at_thread_exit(...) requires move semantics to transfer the unique_lock.
 // UNSUPPORTED: c++03
 
-// 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=system && target={{.+}}-apple-macosx10.{{.+}}
-// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx11.{{.+}}
+// This test requires the fix for LWG3343 (64fc3cd), which is done in the dylib
+// and landed in LLVM 16. Due to the nature of the test, testing on a broken
+// system does not guarantee that the test fails, so we use UNSUPPORTED instead
+// of XFAIL.
+// UNSUPPORTED: using-built-library-before-llvm-16
 
 // 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 59cddd406374e..8499478d1fb38 100644
--- a/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
+++ b/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
@@ -8,11 +8,6 @@
 
 // UNSUPPORTED: c++03
 
-// 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
-
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 // <memory>
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index f93d9ef70e65b..114f72337d60c 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -584,6 +584,13 @@ def check_gdb(cfg):
 # 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 += [
+    Feature(
+        name="_target-before-llvm-10",
+        when=lambda cfg: BooleanExpression.evaluate(
+            "target={{.+}}-apple-macosx{{(10.13|10.14)(.0)?}}",
+            cfg.available_features,
+        ),
+    ),
     Feature(
         name="_target-before-llvm-11",
         when=lambda cfg: BooleanExpression.evaluate(
@@ -690,7 +697,7 @@ def check_gdb(cfg):
 # 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"):
+for version in ("10", "11", "12", "13", "14", "15", "16", "17", "18", "19"):
     DEFAULT_FEATURES.append(
         Feature(
             name="using-built-library-before-llvm-{}".format(version),
diff --git a/libcxxabi/test/catch_function_01.pass.cpp b/libcxxabi/test/catch_function_01.pass.cpp
index 4ca42f8bd7a41..95bfcf60a1a56 100644
--- a/libcxxabi/test/catch_function_01.pass.cpp
+++ b/libcxxabi/test/catch_function_01.pass.cpp
@@ -8,13 +8,11 @@
 
 // Can you have a catch clause of array type that catches anything?
 
+// UNSUPPORTED: no-exceptions
+
 // GCC incorrectly allows function pointer to be caught by reference.
 // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69372
 // XFAIL: gcc
-// UNSUPPORTED: no-exceptions
-
-// 65ace9daa360 made it in the dylib in macOS 10.11
-// 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 3f9e4fcb2e02a..513a54aa087cf 100644
--- a/libcxxabi/test/catch_function_03.pass.cpp
+++ b/libcxxabi/test/catch_function_03.pass.cpp
@@ -10,9 +10,6 @@
 // UNSUPPORTED: c++03, c++11, c++14
 // UNSUPPORTED: no-exceptions
 
-// Support for catching a function pointer including noexcept was shipped in macOS 10.13
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
-
 #include <cassert>
 
 template<bool Noexcept> void f() noexcept(Noexcept) {}
diff --git a/libcxxabi/test/catch_member_data_pointer_01.pass.cpp b/libcxxabi/test/catch_member_data_pointer_01.pass.cpp
index 86313cec014c8..6d739e7932d63 100644
--- a/libcxxabi/test/catch_member_data_pointer_01.pass.cpp
+++ b/libcxxabi/test/catch_member_data_pointer_01.pass.cpp
@@ -8,9 +8,6 @@
 
 // UNSUPPORTED: no-exceptions
 
-// 1b00fc5d8133 made it in the dylib in macOS 10.11
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10}}
-
 #include <cassert>
 
 struct A
diff --git a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp
index 9e6790b0abfb1..112e78779b472 100644
--- a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp
+++ b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp
@@ -10,9 +10,6 @@
 // UNSUPPORTED: c++03, c++11, c++14
 // UNSUPPORTED: no-exceptions
 
-// Support for catching a function pointer including noexcept was shipped in macOS 10.13
-// 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.
 // XFAIL: gcc-13, gcc-14
diff --git a/libcxxabi/test/catch_member_pointer_nullptr.pass.cpp b/libcxxabi/test/catch_member_pointer_nullptr.pass.cpp
index a476386f6db84..fedfb46bca590 100644
--- a/libcxxabi/test/catch_member_pointer_nullptr.pass.cpp
+++ b/libcxxabi/test/catch_member_pointer_nullptr.pass.cpp
@@ -6,10 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Catching an exception thrown as nullptr was not properly handled before
-// 2f984cab4fa7, which landed in macOS 10.13
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
-
 // UNSUPPORTED: no-exceptions
 
 #include <cassert>
diff --git a/libcxxabi/test/catch_multi_level_pointer.pass.cpp b/libcxxabi/test/catch_multi_level_pointer.pass.cpp
index 244056871855c..72c89de8a2081 100644
--- a/libcxxabi/test/catch_multi_level_pointer.pass.cpp
+++ b/libcxxabi/test/catch_multi_level_pointer.pass.cpp
@@ -8,9 +8,6 @@
 
 // UNSUPPORTED: no-exceptions
 
-// 1b00fc5d8133 made it in the dylib in macOS 10.11
-// 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
 // UNSUPPORTED: LIBCXX-PICOLIBC-FIXME
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 d0f719685da75..1bd4277e76d80 100644
--- a/libcxxabi/test/catch_null_pointer_to_object_pr64953.pass.cpp
+++ b/libcxxabi/test/catch_null_pointer_to_object_pr64953.pass.cpp
@@ -25,17 +25,10 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: no-exceptions
-// This test requires the fix to
-// https://github.com/llvm/llvm-project/issues/64953, which is in libc++abi.dylib.
-// The fix is not contained in older macOS system dylibs, so the test will fail
-// there.
-// FIXME: In the case that we are testing `natively` with the CI scripts we
-// currently pass the newly-built libraries to the execution, this leads to an
-// 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}{{.*}}
-// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx{{11|12|13|14}}{{.*}}
+
+// This test requires the fix to https://github.com/llvm/llvm-project/issues/64953,
+// which landed in d5f84e6 and is in the libc++abi built library.
+// XFAIL: using-built-library-before-llvm-18
 
 #include <exception>
 #include <stdlib.h>
diff --git a/libcxxabi/test/catch_pointer_nullptr.pass.cpp b/libcxxabi/test/catch_pointer_nullptr.pass.cpp
index 473a703988bcf..3afb88bc4c694 100644
--- a/libcxxabi/test/catch_pointer_nullptr.pass.cpp
+++ b/libcxxabi/test/catch_pointer_nullptr.pass.cpp
@@ -6,10 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Catching an exception thrown as nullptr was not properly handled before
-// 2f984cab4fa7, which landed in macOS 10.13
-// 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 2b22ad71b5a04..3662464ce43fd 100644
--- a/libcxxabi/test/catch_ptr_02.pass.cpp
+++ b/libcxxabi/test/catch_ptr_02.pass.cpp
@@ -13,9 +13,6 @@
 // behavior under test.
 // ADDITIONAL_COMPILE_FLAGS: -Wno-exceptions
 
-// The fix for PR17222 made it in the dylib for macOS 10.10
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.9
-
 #include <cassert>
 #include <stdint.h>
 
diff --git a/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp b/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp
index c013327f7b751..278670e0eacfa 100644
--- a/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp
+++ b/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp
@@ -8,8 +8,8 @@
 
 // UNSUPPORTED: no-exceptions
 
-// PR41395 isn't fixed until the dylib shipped with macOS 10.15
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// This test requires the fix in http://llvm.org/PR41395 (c4225e124f9e).
+// XFAIL: using-built-library-before-llvm-10
 
 #include "cxxabi.h"
 #include <new>
diff --git a/libcxxabi/test/dynamic_cast.pass.cpp b/libcxxabi/test/dynamic_cast.pass.cpp
index 19d5aab454c55..04d2ffb2832dc 100644
--- a/libcxxabi/test/dynamic_cast.pass.cpp
+++ b/libcxxabi/test/dynamic_cast.pass.cpp
@@ -6,11 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// PR33425 and PR33487 are not fixed until the dylib shipped with macOS 10.15
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.14
-
-// PR33439 isn't fixed until the dylib shipped with macOS 10.14
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13}}
+// This test requires PR33425, PR33487 and PR33439.
+// XFAIL: using-built-library-before-llvm-10
 
 #include <cassert>
 
diff --git a/libcxxabi/test/exception_object_alignment.pass.cpp b/libcxxabi/test/exception_object_alignment.pass.cpp
index 9de59b96d9a35..f3bad321be8d8 100644
--- a/libcxxabi/test/exception_object_alignment.pass.cpp
+++ b/libcxxabi/test/exception_object_alignment.pass.cpp
@@ -8,12 +8,6 @@
 
 // UNSUPPORTED: no-exceptions
 
-// The situation for the alignment of exception objects is badly messed up
-// 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=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/incomplete_type.sh.cpp b/libcxxabi/test/incomplete_type.sh.cpp
index fc26227b8bdc5..721b2770b5ecc 100644
--- a/libcxxabi/test/incomplete_type.sh.cpp
+++ b/libcxxabi/test/incomplete_type.sh.cpp
@@ -16,9 +16,6 @@
 // UNSUPPORTED: no-exceptions
 // UNSUPPORTED: no-rtti
 
-// The fix for PR25898 landed in the system dylibs in macOS 10.13
-// 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
 // RUN: %{cxx} %{flags} %t.one.o %t.two.o %{link_flags} -o %t.exe
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 b65d8b5d33929..1bba8a79885b6 100644
--- a/libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp
+++ b/libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp
@@ -9,8 +9,8 @@
 // UNSUPPORTED: no-exceptions
 
 // ___cxa_throw_bad_array_new_length is re-exported from libc++ only starting
-// in macosx 10.15
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// in LLVM 9 (but we don't track that far).
+// XFAIL: using-built-library-before-llvm-10
 
 #include <cxxabi.h>
 #include <new>
diff --git a/libcxxabi/test/test_demangle.pass.cpp b/libcxxabi/test/test_demangle.pass.cpp
index 1435c879d383d..fe5598991b831 100644
--- a/libcxxabi/test/test_demangle.pass.cpp
+++ b/libcxxabi/test/test_demangle.pass.cpp
@@ -6,16 +6,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-// The demangler does not pass all these tests with the system dylibs on macOS.
-// 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
-// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx11.0
+// UNSUPPORTED: using-built-library-before-llvm-14
 
 // 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 80d42854c87b7..53b5d6bb4c885 100644
--- a/libcxxabi/test/test_exception_address_alignment.pass.cpp
+++ b/libcxxabi/test/test_exception_address_alignment.pass.cpp
@@ -9,12 +9,6 @@
 // UNSUPPORTED: no-exceptions
 // UNSUPPORTED: c++03
 
-// The <unwind.h> header provided in the SDK of older Xcodes used to provide
-// 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=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 54882862e7285..cace88a309d0b 100644
--- a/libcxxabi/test/uncaught_exception.pass.cpp
+++ b/libcxxabi/test/uncaught_exception.pass.cpp
@@ -15,8 +15,7 @@
 // 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=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{(11|12|13|14)([.][0-9]+)?}}
+// XFAIL: using-built-library-before-llvm-19
 
 #include <cxxabi.h>
 #include <cassert>
diff --git a/libcxxabi/test/uncaught_exceptions.pass.cpp b/libcxxabi/test/uncaught_exceptions.pass.cpp
index cf76dc12e5e79..751bb44ab5ee2 100644
--- a/libcxxabi/test/uncaught_exceptions.pass.cpp
+++ b/libcxxabi/test/uncaught_exceptions.pass.cpp
@@ -8,8 +8,9 @@
 
 // UNSUPPORTED: no-exceptions
 
-// __cxa_uncaught_exceptions is not re-exported from libc++ until macOS 10.15.
-// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
+// __cxa_uncaught_exceptions is not re-exported from libc++ until LLVM 9
+// (but we don't check that far).
+// XFAIL: using-built-library-before-llvm-10
 
 #include <cxxabi.h>
 #include <cassert>

>From ca59eaeaa0c0d81f5f9a33503410c1c7b96ea150 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 24 Jun 2024 20:55:24 -0400
Subject: [PATCH 02/12] Update several incorrect version maps

---
 .../string.capacity/over_max_size.pass.cpp     |  5 -----
 libcxx/utils/libcxx/test/features.py           | 18 ++++++++----------
 2 files changed, 8 insertions(+), 15 deletions(-)

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 9ef604cb92aae..b919551c9f880 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
@@ -8,11 +8,6 @@
 
 // UNSUPPORTED: no-exceptions
 
-// Prior to http://llvm.org/D123580 (29c8c070a177), 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: using-built-library-before-llvm-15
-
 // <string>
 
 // size_type max_size() const; // constexpr since C++20
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index 114f72337d60c..5b7ecb937f6f1 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -594,7 +594,7 @@ def check_gdb(cfg):
     Feature(
         name="_target-before-llvm-11",
         when=lambda cfg: BooleanExpression.evaluate(
-            "target={{.+}}-apple-macosx{{(10.13|10.14|10.15)(.0)?}}",
+            "_target-before-llvm-10 || target={{.+}}-apple-macosx{{10.15(.0)?}}",
             cfg.available_features,
         ),
     ),
@@ -608,48 +608,46 @@ def check_gdb(cfg):
     Feature(
         name="_target-before-llvm-13",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-12 || target={{.+}}-apple-macosx{{(12.[3-7]|13.[0-3])(.0)?}}",
+            "_target-before-llvm-12 || target={{.+}}-apple-macosx{{12.[3-7](.0)?}}",
             cfg.available_features,
         ),
     ),
     Feature(
         name="_target-before-llvm-14",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-13",
+            "_target-before-llvm-13 || target={{.+}}-apple-macosx{{13.[0-3](.0)?}}",
             cfg.available_features,
         ),
     ),
     Feature(
         name="_target-before-llvm-15",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-14 || target={{.+}}-apple-macosx{{13.[4-6](.0)?}}",
+            "_target-before-llvm-14",
             cfg.available_features,
         ),
     ),
     Feature(
         name="_target-before-llvm-16",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-15 || target={{.+}}-apple-macosx{{12.[0-3](.0)?}}",
+            "_target-before-llvm-15 || target={{.+}}-apple-macosx{{13.[4-6](.0)?}}",
             cfg.available_features,
         ),
     ),
     Feature(
         name="_target-before-llvm-17",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-16",
+            "_target-before-llvm-16 || target={{.+}}-apple-macosx{{14.[0-3](.0)?}}",
             cfg.available_features,
         ),
     ),
-    # For now, no released version of macOS contains LLVM 18
-    # TODO(ldionne) Please provide the correct value.
     Feature(
         name="_target-before-llvm-18",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-17 || target={{.+}}-apple-macosx{{.+}}",
+            "_target-before-llvm-17 || target={{.+}}-apple-macosx{{14.[4-9](.0)?}}",
             cfg.available_features,
         ),
     ),
-    # For now, no released version of macOS contains LLVM 19
+    # For now, no released version of macOS contains LLVM 18
     # TODO(ldionne) Please provide the correct value.
     Feature(
         name="_target-before-llvm-19",

>From fb2b2f8175bcaaa332337a2167cd15eb4e87b3f4 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 24 Jun 2024 22:56:15 -0500
Subject: [PATCH 03/12] Fix many broken versions. Add missing versions. Reorder
 availability macros so they are defined more naturally.

---
 libcxx/include/__configuration/availability.h | 285 ++++++++++--------
 libcxx/utils/libcxx/test/features.py          |  63 ++--
 2 files changed, 186 insertions(+), 162 deletions(-)

diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h
index 7e6e18b22d93a..e8978ea7a09f2 100644
--- a/libcxx/include/__configuration/availability.h
+++ b/libcxx/include/__configuration/availability.h
@@ -87,171 +87,204 @@
 // in all versions of the library are available.
 #if defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
 
-#  define _LIBCPP_INTRODUCED_IN_LLVM_4 1
-#  define _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE /* nothing */
+#  define _LIBCPP_INTRODUCED_IN_LLVM_19 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE /* nothing */
 
-#  define _LIBCPP_INTRODUCED_IN_LLVM_9 1
-#  define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE      /* nothing */
-#  define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH /* nothing */
-#  define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP  /* nothing */
+#  define _LIBCPP_INTRODUCED_IN_LLVM_18 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE /* nothing */
 
-#  define _LIBCPP_INTRODUCED_IN_LLVM_11 1
-#  define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE /* nothing */
+#  define _LIBCPP_INTRODUCED_IN_LLVM_17 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_17_ATTRIBUTE /* nothing */
 
-#  define _LIBCPP_INTRODUCED_IN_LLVM_12 1
-#  define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE /* nothing */
+#  define _LIBCPP_INTRODUCED_IN_LLVM_16 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_16_ATTRIBUTE /* nothing */
+
+#  define _LIBCPP_INTRODUCED_IN_LLVM_15 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_15_ATTRIBUTE /* nothing */
 
 #  define _LIBCPP_INTRODUCED_IN_LLVM_14 1
 #  define _LIBCPP_INTRODUCED_IN_LLVM_14_ATTRIBUTE /* nothing */
 
-#  define _LIBCPP_INTRODUCED_IN_LLVM_15 1
-#  define _LIBCPP_INTRODUCED_IN_LLVM_15_ATTRIBUTE /* nothing */
+#  define _LIBCPP_INTRODUCED_IN_LLVM_13 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_13_ATTRIBUTE /* nothing */
 
-#  define _LIBCPP_INTRODUCED_IN_LLVM_16 1
-#  define _LIBCPP_INTRODUCED_IN_LLVM_16_ATTRIBUTE /* nothing */
+#  define _LIBCPP_INTRODUCED_IN_LLVM_12 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE /* nothing */
 
-#  define _LIBCPP_INTRODUCED_IN_LLVM_18 1
-#  define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE /* nothing */
+#  define _LIBCPP_INTRODUCED_IN_LLVM_11 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE /* nothing */
 
-#  define _LIBCPP_INTRODUCED_IN_LLVM_19 1
-#  define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE /* nothing */
+#  define _LIBCPP_INTRODUCED_IN_LLVM_10 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE /* nothing */
+
+#  define _LIBCPP_INTRODUCED_IN_LLVM_9 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE      /* nothing */
+#  define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH /* nothing */
+#  define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP  /* nothing */
+
+#  define _LIBCPP_INTRODUCED_IN_LLVM_8 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_8_ATTRIBUTE /* nothing */
+
+#  define _LIBCPP_INTRODUCED_IN_LLVM_4 1
+#  define _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE /* nothing */
 
 #elif defined(__APPLE__)
 
-// LLVM 4
-#  if defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000
-#    define _LIBCPP_INTRODUCED_IN_LLVM_4 0
-#    define _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE __attribute__((availability(watchos, strict, introduced = 5.0)))
+// clang-format off
+
+// LLVM 19
+// TODO: Fill this in
+#  define _LIBCPP_INTRODUCED_IN_LLVM_19 0
+#  define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE __attribute__((unavailable))
+
+// LLVM 18
+// TODO: Fill this in
+#  define _LIBCPP_INTRODUCED_IN_LLVM_18 0
+#  define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE __attribute__((unavailable))
+
+// LLVM 17
+#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140400) ||       \
+      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 170400) ||     \
+      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 170400) ||             \
+      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100400)
+#    define _LIBCPP_INTRODUCED_IN_LLVM_17 0
 #  else
-#    define _LIBCPP_INTRODUCED_IN_LLVM_4 1
-#    define _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE /* nothing */
+#    define _LIBCPP_INTRODUCED_IN_LLVM_17 1
 #  endif
+#  define _LIBCPP_INTRODUCED_IN_LLVM_17_ATTRIBUTE                                                                 \
+    __attribute__((availability(macos, strict, introduced = 14.4)))                                               \
+    __attribute__((availability(ios, strict, introduced = 17.4)))                                                 \
+    __attribute__((availability(tvos, strict, introduced = 17.4)))                                                \
+    __attribute__((availability(watchos, strict, introduced = 10.4)))
+
+// LLVM 16
+#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140000) ||       \
+      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 170000) ||     \
+      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 170000) ||             \
+      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100000)
+#    define _LIBCPP_INTRODUCED_IN_LLVM_16 0
+#  else
+#    define _LIBCPP_INTRODUCED_IN_LLVM_16 1
+#  endif
+#  define _LIBCPP_INTRODUCED_IN_LLVM_16_ATTRIBUTE                                                                 \
+    __attribute__((availability(macos, strict, introduced = 14.0)))                                               \
+    __attribute__((availability(ios, strict, introduced = 17.0)))                                                 \
+    __attribute__((availability(tvos, strict, introduced = 17.0)))                                                \
+    __attribute__((availability(watchos, strict, introduced = 10.0)))
 
-// LLVM 9
-// clang-format off
-#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500) ||   \
-      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000) || \
-      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 130000) ||         \
-      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000)
-// clang-format on
-#    define _LIBCPP_INTRODUCED_IN_LLVM_9 0
-#    define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE                                                                     \
-      __attribute__((availability(macos, strict, introduced = 10.15)))                                                 \
-      __attribute__((availability(ios, strict, introduced = 13.0)))                                                    \
-      __attribute__((availability(tvos, strict, introduced = 13.0)))                                                   \
-      __attribute__((availability(watchos, strict, introduced = 6.0)))
-// clang-format off
-#    define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH                                                                               \
-      _Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \
-      _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))")    \
-      _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))")   \
-      _Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))")
-#    define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP                                                                    \
-      _Pragma("clang attribute pop") \
-      _Pragma("clang attribute pop") \
-      _Pragma("clang attribute pop") \
-      _Pragma("clang attribute pop")
-// clang-format on
+// LLVM 15
+#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130400) ||   \
+      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160500) || \
+      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160500) ||         \
+      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90500))
+#    define _LIBCPP_INTRODUCED_IN_LLVM_15 0
 #  else
-#    define _LIBCPP_INTRODUCED_IN_LLVM_9 1
-#    define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE      /* nothing */
-#    define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH /* nothing */
-#    define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP  /* nothing */
+#    define _LIBCPP_INTRODUCED_IN_LLVM_15 1
 #  endif
+#  define _LIBCPP_INTRODUCED_IN_LLVM_15_ATTRIBUTE                                                                 \
+    __attribute__((availability(macos, strict, introduced = 13.4)))                                               \
+    __attribute__((availability(ios, strict, introduced = 16.5)))                                                 \
+    __attribute__((availability(tvos, strict, introduced = 16.5)))                                                \
+    __attribute__((availability(watchos, strict, introduced = 9.5)))
 
-// 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_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)))
+// LLVM 14
+#  define _LIBCPP_INTRODUCED_IN_LLVM_14 _LIBCPP_INTRODUCED_IN_LLVM_15
+#  define _LIBCPP_INTRODUCED_IN_LLVM_14_ATTRIBUTE _LIBCPP_INTRODUCED_IN_LLVM_15_ATTRIBUTE
+
+// LLVM 13
+#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130000) ||   \
+      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160000) || \
+      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160000) ||         \
+      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90000)
+#    define _LIBCPP_INTRODUCED_IN_LLVM_13 0
 #  else
-#    define _LIBCPP_INTRODUCED_IN_LLVM_11 1
-#    define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE /* nothing */
+#    define _LIBCPP_INTRODUCED_IN_LLVM_13 1
 #  endif
+#  define _LIBCPP_INTRODUCED_IN_LLVM_13_ATTRIBUTE                                                                 \
+    __attribute__((availability(macos, strict, introduced = 13.0)))                                               \
+    __attribute__((availability(ios, strict, introduced = 16.0)))                                                 \
+    __attribute__((availability(tvos, strict, introduced = 16.0)))                                                \
+    __attribute__((availability(watchos, strict, introduced = 9.0)))
 
 // LLVM 12
-// clang-format off
-#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 120000)   || \
-      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 150000) || \
-      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 150000)         || \
-      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 80000)
-// clang-format on
+#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 120300)   ||     \
+      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 150300) ||     \
+      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 150300)         ||     \
+      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 80300)
 #    define _LIBCPP_INTRODUCED_IN_LLVM_12 0
-#    define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE                                                                    \
-      __attribute__((availability(macos, strict, introduced = 12.0)))                                                  \
-      __attribute__((availability(ios, strict, introduced = 15.0)))                                                    \
-      __attribute__((availability(tvos, strict, introduced = 15.0)))                                                   \
-      __attribute__((availability(watchos, strict, introduced = 8.0)))
 #  else
 #    define _LIBCPP_INTRODUCED_IN_LLVM_12 1
-#    define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE /* nothing */
 #  endif
+#  define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE                                                                 \
+    __attribute__((availability(macos, strict, introduced = 12.3)))                                               \
+    __attribute__((availability(ios, strict, introduced = 15.3)))                                                 \
+    __attribute__((availability(tvos, strict, introduced = 15.3)))                                                \
+    __attribute__((availability(watchos, strict, introduced = 8.3)))
 
-// LLVM 14
-// clang-format off
-#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130400) ||   \
-      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160500) || \
-      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160500) ||         \
-      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90500)
-// clang-format on
-#    define _LIBCPP_INTRODUCED_IN_LLVM_14 0
-#    define _LIBCPP_INTRODUCED_IN_LLVM_14_ATTRIBUTE                                                                    \
-      __attribute__((availability(macos, strict, introduced = 13.4)))                                                  \
-      __attribute__((availability(ios, strict, introduced = 16.5)))                                                    \
-      __attribute__((availability(tvos, strict, introduced = 16.5)))                                                   \
-      __attribute__((availability(watchos, strict, introduced = 9.5)))
+// LLVM 11
+#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 120000) ||   \
+      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 150000) || \
+      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 150000) ||         \
+      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 80000)
+#    define _LIBCPP_INTRODUCED_IN_LLVM_11 0
 #  else
-#    define _LIBCPP_INTRODUCED_IN_LLVM_14 1
-#    define _LIBCPP_INTRODUCED_IN_LLVM_14_ATTRIBUTE /* nothing */
+#    define _LIBCPP_INTRODUCED_IN_LLVM_11 1
 #  endif
+#  define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE                                                                 \
+    __attribute__((availability(macos, strict, introduced = 12.0)))                                               \
+    __attribute__((availability(ios, strict, introduced = 15.0)))                                                 \
+    __attribute__((availability(tvos, strict, introduced = 15.0)))                                                \
+    __attribute__((availability(watchos, strict, introduced = 8.0)))
 
-// LLVM 15-16
-#  define _LIBCPP_INTRODUCED_IN_LLVM_15 _LIBCPP_INTRODUCED_IN_LLVM_16
-#  define _LIBCPP_INTRODUCED_IN_LLVM_15_ATTRIBUTE _LIBCPP_INTRODUCED_IN_LLVM_16_ATTRIBUTE
-// clang-format off
-#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140000) ||   \
-      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 170000) || \
-      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 170000) ||         \
-      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100000)
-// clang-format on
-#    define _LIBCPP_INTRODUCED_IN_LLVM_16 0
-#    define _LIBCPP_INTRODUCED_IN_LLVM_16_ATTRIBUTE                                                                    \
-      __attribute__((availability(macos, strict, introduced = 14.0)))                                                  \
-      __attribute__((availability(ios, strict, introduced = 17.0)))                                                    \
-      __attribute__((availability(tvos, strict, introduced = 17.0)))                                                   \
-      __attribute__((availability(watchos, strict, introduced = 10.0)))
+// LLVM 10
+#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) ||   \
+      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 140000) || \
+      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 140000) ||         \
+      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 70000)
+#    define _LIBCPP_INTRODUCED_IN_LLVM_10 0
 #  else
-#    define _LIBCPP_INTRODUCED_IN_LLVM_16 1
-#    define _LIBCPP_INTRODUCED_IN_LLVM_16_ATTRIBUTE /* nothing */
+#    define _LIBCPP_INTRODUCED_IN_LLVM_10 1
 #  endif
+#  define _LIBCPP_INTRODUCED_IN_LLVM_10_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)))
 
-// LLVM 18
-// TODO: Fill this in
-#  if 1
-#    define _LIBCPP_INTRODUCED_IN_LLVM_18 0
-#    define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE __attribute__((unavailable))
+// LLVM 9
+#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500) ||   \
+      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000) || \
+      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 130000) ||         \
+      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000)
+#    define _LIBCPP_INTRODUCED_IN_LLVM_9 0
 #  else
-#    define _LIBCPP_INTRODUCED_IN_LLVM_18 1
-#    define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE /* nothing */
+#    define _LIBCPP_INTRODUCED_IN_LLVM_9 1
 #  endif
+#  define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE                                                                  \
+    __attribute__((availability(macos, strict, introduced = 10.15)))                                              \
+    __attribute__((availability(ios, strict, introduced = 13.0)))                                                 \
+    __attribute__((availability(tvos, strict, introduced = 13.0)))                                                \
+    __attribute__((availability(watchos, strict, introduced = 6.0)))
+#  define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH                                                                            \
+    _Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \
+    _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))")    \
+    _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))")   \
+    _Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))")
+#  define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP                                                                    \
+    _Pragma("clang attribute pop") \
+    _Pragma("clang attribute pop") \
+    _Pragma("clang attribute pop") \
+    _Pragma("clang attribute pop")
 
-// LLVM 19
-// TODO: Fill this in
-#  if 1
-#    define _LIBCPP_INTRODUCED_IN_LLVM_19 0
-#    define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE __attribute__((unavailable))
+// LLVM 4
+#  if defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000
+#    define _LIBCPP_INTRODUCED_IN_LLVM_4 0
 #  else
-#    define _LIBCPP_INTRODUCED_IN_LLVM_19 1
-#    define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE /* nothing */
+#    define _LIBCPP_INTRODUCED_IN_LLVM_4 1
 #  endif
+#  define _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE __attribute__((availability(watchos, strict, introduced = 5.0)))
+
+// clang-format on
 
 #else
 
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index 5b7ecb937f6f1..f82495b99715f 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -585,74 +585,65 @@ def check_gdb(cfg):
 # Those are used for backdeployment features below, do not use directly in tests.
 DEFAULT_FEATURES += [
     Feature(
-        name="_target-before-llvm-10",
+        name="_target-has-llvm-17",
         when=lambda cfg: BooleanExpression.evaluate(
-            "target={{.+}}-apple-macosx{{(10.13|10.14)(.0)?}}",
+            "target={{.+}}-apple-macosx{{14.[4-9](.0)?}}",
             cfg.available_features,
         ),
     ),
     Feature(
-        name="_target-before-llvm-11",
+        name="_target-has-llvm-16",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-10 || target={{.+}}-apple-macosx{{10.15(.0)?}}",
+            "_target-has-llvm-17 || target={{.+}}-apple-macosx{{14.[0-3](.0)?}}",
             cfg.available_features,
         ),
     ),
     Feature(
-        name="_target-before-llvm-12",
+        name="_target-has-llvm-15",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-11 || target={{.+}}-apple-macosx{{(11(.\d+)?|12.[0-2])(.0)?}}",
+            "_target-has-llvm-16 || target={{.+}}-apple-macosx{{13.[4-9](.0)?}}",
             cfg.available_features,
         ),
     ),
     Feature(
-        name="_target-before-llvm-13",
+        name="_target-has-llvm-14",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-12 || target={{.+}}-apple-macosx{{12.[3-7](.0)?}}",
+            "_target-has-llvm-15",
             cfg.available_features,
         ),
     ),
     Feature(
-        name="_target-before-llvm-14",
+        name="_target-has-llvm-13",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-13 || target={{.+}}-apple-macosx{{13.[0-3](.0)?}}",
+            "_target-has-llvm-14 || target={{.+}}-apple-macosx{{13.[0-3](.0)?}}",
             cfg.available_features,
         ),
     ),
     Feature(
-        name="_target-before-llvm-15",
+        name="_target-has-llvm-12",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-14",
+            "_target-has-llvm-13 || target={{.+}}-apple-macosx{{12.[3-9](.0)?}}",
             cfg.available_features,
         ),
     ),
     Feature(
-        name="_target-before-llvm-16",
+        name="_target-has-llvm-11",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-15 || target={{.+}}-apple-macosx{{13.[4-6](.0)?}}",
+            "_target-has-llvm-12 || target={{.+}}-apple-macosx{{12.[0-2](.0)?}}",
             cfg.available_features,
         ),
     ),
     Feature(
-        name="_target-before-llvm-17",
+        name="_target-has-llvm-10",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-16 || target={{.+}}-apple-macosx{{14.[0-3](.0)?}}",
+            "_target-has-llvm-11 || target={{.+}}-apple-macosx{{11.[0-9](.0)?}}",
             cfg.available_features,
         ),
     ),
     Feature(
-        name="_target-before-llvm-18",
+        name="_target-has-llvm-9",
         when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-17 || target={{.+}}-apple-macosx{{14.[4-9](.0)?}}",
-            cfg.available_features,
-        ),
-    ),
-    # For now, no released version of macOS contains LLVM 18
-    # TODO(ldionne) Please provide the correct value.
-    Feature(
-        name="_target-before-llvm-19",
-        when=lambda cfg: BooleanExpression.evaluate(
-            "_target-before-llvm-18 || target={{.+}}-apple-macosx{{.+}}",
+            "_target-has-llvm-10 || target={{.+}}-apple-macosx{{10.15(.0)?}}",
             cfg.available_features,
         ),
     ),
@@ -700,7 +691,7 @@ def check_gdb(cfg):
         Feature(
             name="using-built-library-before-llvm-{}".format(version),
             when=lambda cfg: BooleanExpression.evaluate(
-                "stdlib=system && _target-before-llvm-{}".format(version),
+                "stdlib=system && !_target-has-llvm-{}".format(version),
                 cfg.available_features,
             ),
         )
@@ -711,7 +702,7 @@ def check_gdb(cfg):
     Feature(
         name="availability-filesystem-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{(13|14)(.0)?}})",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && !_target-has-llvm-9)",
             cfg.available_features,
         ),
     ),
@@ -719,7 +710,7 @@ def check_gdb(cfg):
     Feature(
         name="availability-synchronization_library-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && _target-before-llvm-11)",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && !_target-has-llvm-11)",
             cfg.available_features,
         ),
     ),
@@ -727,7 +718,7 @@ def check_gdb(cfg):
     Feature(
         name="availability-char8_t_support-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && _target-before-llvm-12)",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && !_target-has-llvm-12)",
             cfg.available_features,
         ),
     ),
@@ -735,7 +726,7 @@ def check_gdb(cfg):
     Feature(
         name="availability-verbose_abort-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && _target-before-llvm-13)",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && !_target-has-llvm-13)",
             cfg.available_features,
         ),
     ),
@@ -743,7 +734,7 @@ def check_gdb(cfg):
     Feature(
         name="availability-pmr-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && _target-before-llvm-13)",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && !_target-has-llvm-13)",
             cfg.available_features,
         ),
     ),
@@ -751,7 +742,7 @@ def check_gdb(cfg):
     Feature(
         name="availability-fp_to_chars-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && _target-before-llvm-14)",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && !_target-has-llvm-14)",
             cfg.available_features,
         ),
     ),
@@ -759,7 +750,7 @@ def check_gdb(cfg):
     Feature(
         name="availability-print-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && _target-before-llvm-18)",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && !_target-has-llvm-18)",
             cfg.available_features,
         ),
     ),
@@ -767,7 +758,7 @@ def check_gdb(cfg):
     Feature(
         name="availability-tzdb-missing",
         when=lambda cfg: BooleanExpression.evaluate(
-            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && _target-before-llvm-19)",
+            "!libcpp-has-no-availability-markup && (stdlib=apple-libc++ && !_target-has-llvm-19)",
             cfg.available_features,
         ),
     ),

>From 2b8217ab3d73df5953bad241df4c9defe12052c6 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Tue, 25 Jun 2024 08:42:52 -0500
Subject: [PATCH 04/12] Fix typo

---
 libcxx/include/__configuration/availability.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h
index e8978ea7a09f2..a16030aa61c67 100644
--- a/libcxx/include/__configuration/availability.h
+++ b/libcxx/include/__configuration/availability.h
@@ -176,7 +176,7 @@
 #  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130400) ||   \
       (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160500) || \
       (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160500) ||         \
-      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90500))
+      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90500)
 #    define _LIBCPP_INTRODUCED_IN_LLVM_15 0
 #  else
 #    define _LIBCPP_INTRODUCED_IN_LLVM_15 1

>From 3c170dbe5322248a248887d6c8716f6322d7b48f Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Tue, 25 Jun 2024 16:42:04 -0500
Subject: [PATCH 05/12] Adjust incorrect XFAIL

---
 .../istream.formatted.arithmetic/bool.pass.cpp                  | 2 +-
 .../istream.formatted.arithmetic/double.pass.cpp                | 2 +-
 .../istream.formatted.arithmetic/float.pass.cpp                 | 2 +-
 .../istream.formatted/istream.formatted.arithmetic/int.pass.cpp | 2 +-
 .../istream.formatted.arithmetic/long.pass.cpp                  | 2 +-
 .../istream.formatted.arithmetic/long_double.pass.cpp           | 2 +-
 .../istream.formatted.arithmetic/long_long.pass.cpp             | 2 +-
 .../istream.formatted.arithmetic/pointer.pass.cpp               | 2 +-
 .../istream.formatted.arithmetic/short.pass.cpp                 | 2 +-
 .../istream.formatted.arithmetic/unsigned_int.pass.cpp          | 2 +-
 .../istream.formatted.arithmetic/unsigned_long.pass.cpp         | 2 +-
 .../istream.formatted.arithmetic/unsigned_long_long.pass.cpp    | 2 +-
 .../istream.formatted.arithmetic/unsigned_short.pass.cpp        | 2 +-
 .../istream.formatted/istream_extractors/streambuf.pass.cpp     | 2 +-
 .../input.streams/istream.unformatted/get.pass.cpp              | 2 +-
 .../input.streams/istream.unformatted/get_chart.pass.cpp        | 2 +-
 .../input.streams/istream.unformatted/get_pointer_size.pass.cpp | 2 +-
 .../istream.unformatted/get_pointer_size_chart.pass.cpp         | 2 +-
 .../input.streams/istream.unformatted/get_streambuf.pass.cpp    | 2 +-
 .../istream.unformatted/get_streambuf_chart.pass.cpp            | 2 +-
 .../istream.unformatted/getline_pointer_size.pass.cpp           | 2 +-
 .../istream.unformatted/getline_pointer_size_chart.pass.cpp     | 2 +-
 .../input.streams/istream.unformatted/ignore.pass.cpp           | 2 +-
 .../input.streams/istream.unformatted/peek.pass.cpp             | 2 +-
 .../input.streams/istream.unformatted/read.pass.cpp             | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

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 d04afe8da7272..0e71f254954bd 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 13ff797c215b7..4776299c235c5 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 d859274a1b362..9b84a69c9ae10 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 c15ef42ede16c..00e335795dc6a 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 e546769dc1f34..4d9b1181a1b70 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 ce3626577fe69..3d0f0035a3d6d 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 e60432dda618a..7e19304c4942d 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 9085062bd757c..0a94762b0082b 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 8da1a0c8aa24c..cd0955f8bf349 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 401dfe3462bc2..87aadac1181f6 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 223feb2b99b9e..189a79dae9e53 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 c9af972fb550e..7ca4224d098b5 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 3003660cb14f0..ba231c47a7fe5 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 2dddf8344fc9a..7eaf6f5a68ec9 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 9c793c922c473..b9279d92f83f0 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 564cd63c8cd58..deb186c179760 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 f46055c0fc3e7..7556d1b65020f 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
@@ -9,7 +9,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).
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 7c9d9d99aeb99..b833d231be79b 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
@@ -9,7 +9,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).
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 7468295fac24f..49e7556d46720 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 ccf6d63b9afec..9e117c84d77ce 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 a55bdf807cec0..348464a9c7fd6 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
@@ -9,7 +9,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).
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 76db68d67d4d7..9a02dd8c41be3 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
@@ -9,7 +9,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).
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 6befb5983fe05..646bd9f0feee0 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 e7caf8adc27ce..cf39982115399 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <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 8a8aec5246931..c30ccb46c04cf 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
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Requires 396145d in the built library.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 // <istream>
 

>From 89ca5629973675d3067a89a640a0ad615f3865d0 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Tue, 25 Jun 2024 16:55:19 -0500
Subject: [PATCH 06/12] Remove seemingly incorrect markup since D32670 was
 fixed in LLVM 5

---
 .../ostream.inserters.arithmetic/minmax_showbase.pass.cpp     | 4 ----
 1 file changed, 4 deletions(-)

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 06353a44ec41b..c39cb57673e6c 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
@@ -23,10 +23,6 @@
 //  Testing to make sure that the max length values are correctly inserted when
 //  using std::showbase
 
-// This test exposes a regression that was not fixed yet in the libc++
-// shipped before we landed D32670. See D32670 for details.
-// XFAIL: using-built-library-before-llvm-10
-
 #include <cassert>
 #include <cstdint>
 #include <ios>

>From dc7c5d32116a5b1c85e94e4313d813ef3f08df69 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Tue, 25 Jun 2024 17:19:55 -0500
Subject: [PATCH 07/12] Try adjusting a few versions

---
 .../ios.base/ios.types/ios_Init/ios_Init.multiple.pass.cpp | 2 +-
 .../uncaught/uncaught_exceptions.pass.cpp                  | 7 ++++---
 .../locale.num.get/facet.num.get.members/get_long.pass.cpp | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

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 fab1b39940a86..4842bf23e6690 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
@@ -15,7 +15,7 @@
 // Taken from https://llvm.org/PR43300
 
 // This test requires the fix for PR43300 (7b81a13bfcd1).
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 int main(int, char**)
 {
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 64d1be9fb5ed8..40aad7103a4b6 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
@@ -8,9 +8,10 @@
 
 // UNSUPPORTED: no-exceptions
 
-// std::uncaught_exceptions() gives the wrong answer in older versions
-// of the dylib, where it only gives 0 or 1. This was fixed later.
-// XFAIL: using-built-library-before-llvm-10
+// std::uncaught_exceptions() gives the wrong answer in versions of
+// the dylib that don't contain 3a92ecc. Previously, it only returned
+// 0 or 1.
+// XFAIL: using-built-library-before-llvm-9
 
 // test uncaught_exceptions
 
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 f1f1e878a104f..03b74ebf53936 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 http://llvm.org/PR28704 (2dda1ff), which
 // isn't in the dylib for some systems.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 #include <locale>
 #include <ios>

>From 7ae5a648867d5b79eb19b688bb907a34534e6dde Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Tue, 25 Jun 2024 17:25:03 -0500
Subject: [PATCH 08/12] [TEMP] Disable most CI to relieve resources

---
 .github/workflows/libcxx-build-and-test.yaml | 121 ++++++++++---------
 1 file changed, 61 insertions(+), 60 deletions(-)

diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index d7c21394ca486..b5047f7b08246 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -91,24 +91,24 @@ jobs:
       fail-fast: false
       matrix:
         config: [
-          'generic-cxx11',
-          'generic-cxx14',
-          'generic-cxx17',
-          'generic-cxx20',
-          'generic-cxx23'
+          # 'generic-cxx11',
+          # 'generic-cxx14',
+          # 'generic-cxx17',
+          # 'generic-cxx20',
+          # 'generic-cxx23'
         ]
         cc: [ 'clang-19' ]
         cxx: [ 'clang++-19' ]
-        include:
-          - config: 'generic-gcc-cxx11'
-            cc: 'gcc-13'
-            cxx: 'g++-13'
-          - config: 'generic-cxx23'
-            cc: 'clang-17'
-            cxx: 'clang++-17'
-          - config: 'generic-cxx26'
-            cc: 'clang-18'
-            cxx: 'clang++-18'
+        # include:
+        #   - config: 'generic-gcc-cxx11'
+        #     cc: 'gcc-13'
+        #     cxx: 'g++-13'
+        #   - config: 'generic-cxx23'
+        #     cc: 'clang-17'
+        #     cxx: 'clang++-17'
+        #   - config: 'generic-cxx26'
+        #     cc: 'clang-18'
+        #     cxx: 'clang++-18'
     steps:
       - uses: actions/checkout at v4
       - name: ${{ matrix.config }}
@@ -135,43 +135,43 @@ jobs:
       max-parallel: 8
       matrix:
         config: [
-          'generic-abi-unstable',
-          'generic-hardening-mode-debug',
-          'generic-hardening-mode-extensive',
-          'generic-hardening-mode-fast',
-          'generic-hardening-mode-fast-with-abi-breaks',
-          'generic-merged',
-          'generic-modules-lsv',
-          'generic-no-exceptions',
-          'generic-no-experimental',
-          'generic-no-filesystem',
-          'generic-no-localization',
-          'generic-no-random_device',
-          'generic-no-threads',
-          'generic-no-tzdb',
-          'generic-no-unicode',
-          'generic-no-wide-characters',
-          'generic-no-rtti',
-          'generic-optimized-speed',
-          'generic-static',
-          # TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive
-          # or don't provide much value since the benchmark run results are too noise on the bots.
-          'benchmarks',
-          'bootstrapping-build'
+          # 'generic-abi-unstable',
+          # 'generic-hardening-mode-debug',
+          # 'generic-hardening-mode-extensive',
+          # 'generic-hardening-mode-fast',
+          # 'generic-hardening-mode-fast-with-abi-breaks',
+          # 'generic-merged',
+          # 'generic-modules-lsv',
+          # 'generic-no-exceptions',
+          # 'generic-no-experimental',
+          # 'generic-no-filesystem',
+          # 'generic-no-localization',
+          # 'generic-no-random_device',
+          # 'generic-no-threads',
+          # 'generic-no-tzdb',
+          # 'generic-no-unicode',
+          # 'generic-no-wide-characters',
+          # 'generic-no-rtti',
+          # 'generic-optimized-speed',
+          # 'generic-static',
+          # # TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive
+          # # or don't provide much value since the benchmark run results are too noise on the bots.
+          # 'benchmarks',
+          # 'bootstrapping-build'
         ]
         machine: [ 'libcxx-runners-8-set' ]
-        include:
-        - config: 'generic-cxx26'
-          machine: libcxx-runners-8-set
-        - config: 'generic-asan'
-          machine: libcxx-runners-8-set
-        - config: 'generic-tsan'
-          machine: libcxx-runners-8-set
-        - config: 'generic-ubsan'
-          machine: libcxx-runners-8-set
-        # Use a larger machine for MSAN to avoid timeout and memory allocation issues.
-        - config: 'generic-msan'
-          machine: libcxx-runners-8-set
+        # include:
+        # - config: 'generic-cxx26'
+        #   machine: libcxx-runners-8-set
+        # - config: 'generic-asan'
+        #   machine: libcxx-runners-8-set
+        # - config: 'generic-tsan'
+        #   machine: libcxx-runners-8-set
+        # - config: 'generic-ubsan'
+        #   machine: libcxx-runners-8-set
+        # # Use a larger machine for MSAN to avoid timeout and memory allocation issues.
+        # - config: 'generic-msan'
+        #   machine: libcxx-runners-8-set
     runs-on: ${{ matrix.machine }}
     steps:
       - uses: actions/checkout at v4
@@ -195,16 +195,17 @@ jobs:
     needs: [ stage1 ]
     strategy:
       fail-fast: false
-      matrix:
-        include:
-        - { config: clang-cl-dll, mingw: false }
-        - { config: clang-cl-static, mingw: false }
-        - { config: clang-cl-no-vcruntime, mingw: false }
-        - { config: clang-cl-debug, mingw: false }
-        - { config: clang-cl-static-crt, mingw: false }
-        - { config: mingw-dll, mingw: true }
-        - { config: mingw-static, mingw: true }
-        - { config: mingw-dll-i686, mingw: true }
+      config: []
+      # matrix:
+      #   include:
+      #   - { config: clang-cl-dll, mingw: false }
+      #   - { config: clang-cl-static, mingw: false }
+      #   - { config: clang-cl-no-vcruntime, mingw: false }
+      #   - { config: clang-cl-debug, mingw: false }
+      #   - { config: clang-cl-static-crt, mingw: false }
+      #   - { config: mingw-dll, mingw: true }
+      #   - { config: mingw-static, mingw: true }
+      #   - { config: mingw-dll-i686, mingw: true }
     steps:
       - uses: actions/checkout at v4
       - name: Install dependencies

>From 8eea48d33dc272a7d89ceaa298ad8dac793b558b Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 26 Jun 2024 10:23:22 -0500
Subject: [PATCH 09/12] [TEMP] Extra verbose when running tests

---
 libcxx/utils/ci/run-buildbot | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index f1c20b9d72190..0cd145690f47e 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -381,7 +381,7 @@ bootstrapping-build)
           -DLLVM_TARGETS_TO_BUILD="host" \
           -DRUNTIMES_BUILD_ALLOW_DARWIN=ON \
           -DLLVM_ENABLE_ASSERTIONS=ON \
-          -DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
+          -DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --show-all --time-tests"
 
     echo "+++ Running the LLDB libc++ data formatter tests"
     ${NINJA} -vC "${BUILD_DIR}" check-lldb-api-functionalities-data-formatter-data-formatter-stl-libcxx

>From 367c8d74c3bbb23201e28966bfaefe188e8e5a5c Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 26 Jun 2024 10:26:21 -0500
Subject: [PATCH 10/12] Fix incorrect versions in libc++abi tests

---
 libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp  | 2 +-
 libcxxabi/test/dynamic_cast.pass.cpp                  | 2 +-
 libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp | 4 ++--
 libcxxabi/test/uncaught_exceptions.pass.cpp           | 5 ++---
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp b/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp
index 278670e0eacfa..b3ecf485d3951 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
 
 // This test requires the fix in http://llvm.org/PR41395 (c4225e124f9e).
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 #include "cxxabi.h"
 #include <new>
diff --git a/libcxxabi/test/dynamic_cast.pass.cpp b/libcxxabi/test/dynamic_cast.pass.cpp
index 04d2ffb2832dc..b144e8c06bc5f 100644
--- a/libcxxabi/test/dynamic_cast.pass.cpp
+++ b/libcxxabi/test/dynamic_cast.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // This test requires PR33425, PR33487 and PR33439.
-// XFAIL: using-built-library-before-llvm-10
+// XFAIL: using-built-library-before-llvm-9
 
 #include <cassert>
 
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 1bba8a79885b6..3b4cea02012dd 100644
--- a/libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp
+++ b/libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp
@@ -9,8 +9,8 @@
 // UNSUPPORTED: no-exceptions
 
 // ___cxa_throw_bad_array_new_length is re-exported from libc++ only starting
-// in LLVM 9 (but we don't track that far).
-// XFAIL: using-built-library-before-llvm-10
+// in LLVM 9.
+// XFAIL: using-built-library-before-llvm-9
 
 #include <cxxabi.h>
 #include <new>
diff --git a/libcxxabi/test/uncaught_exceptions.pass.cpp b/libcxxabi/test/uncaught_exceptions.pass.cpp
index 751bb44ab5ee2..d1074616386be 100644
--- a/libcxxabi/test/uncaught_exceptions.pass.cpp
+++ b/libcxxabi/test/uncaught_exceptions.pass.cpp
@@ -8,9 +8,8 @@
 
 // UNSUPPORTED: no-exceptions
 
-// __cxa_uncaught_exceptions is not re-exported from libc++ until LLVM 9
-// (but we don't check that far).
-// XFAIL: using-built-library-before-llvm-10
+// __cxa_uncaught_exceptions is not re-exported from libc++ until LLVM 9.
+// XFAIL: using-built-library-before-llvm-9
 
 #include <cxxabi.h>
 #include <cassert>

>From 3a78124a8b6ce29d892df6457021b1b2c7d91678 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 26 Jun 2024 10:28:00 -0500
Subject: [PATCH 11/12] [TEMP] Remove non-Apple Buildkite jobs to relieve CI
 pressure

---
 libcxx/utils/ci/buildkite-pipeline.yml | 126 -------------------------
 1 file changed, 126 deletions(-)

diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 71d211bfc287d..42707c4cb14b6 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -121,129 +121,3 @@ steps:
       arch: x86_64 # TODO: Remove this once we are able to run back-deployment on arm64 again, since this isn't x86_64 specific
     <<: *common
 
-- group: ARM
-  steps:
-  - label: AArch64
-    command: libcxx/utils/ci/run-buildbot aarch64
-    agents:
-      queue: libcxx-builders-linaro-arm
-      arch: aarch64
-    <<: *common
-
-  - label: AArch64 -fno-exceptions
-    command: libcxx/utils/ci/run-buildbot aarch64-no-exceptions
-    agents:
-      queue: libcxx-builders-linaro-arm
-      arch: aarch64
-    <<: *common
-
-  - label: Armv8
-    command: libcxx/utils/ci/run-buildbot armv8
-    agents:
-      queue: libcxx-builders-linaro-arm
-      arch: armv8l
-    <<: *common
-
-  - label: Armv8 -fno-exceptions
-    command: libcxx/utils/ci/run-buildbot armv8-no-exceptions
-    agents:
-      queue: libcxx-builders-linaro-arm
-      arch: armv8l
-    <<: *common
-
-  - label: Armv7
-    command: libcxx/utils/ci/run-buildbot armv7
-    agents:
-      queue: libcxx-builders-linaro-arm
-      arch: armv8l
-    <<: *common
-
-  - label: Armv7 -fno-exceptions
-    command: libcxx/utils/ci/run-buildbot armv7-no-exceptions
-    agents:
-      queue: libcxx-builders-linaro-arm
-      arch: armv8l
-    <<: *common
-
-  - label: Armv7-M picolibc
-    command: libcxx/utils/ci/run-buildbot armv7m-picolibc
-    agents:
-      queue: libcxx-builders-linaro-arm
-      arch: aarch64
-    <<: *common
-
-  - label: Armv7-M picolibc -fno-exceptions
-    command: libcxx/utils/ci/run-buildbot armv7m-picolibc-no-exceptions
-    agents:
-      queue: libcxx-builders-linaro-arm
-      arch: aarch64
-    <<: *common
-
-- group: AIX
-  steps:
-  - label: AIX (32-bit)
-    command: libcxx/utils/ci/run-buildbot aix
-    env:
-      CC: clang
-      CXX: clang++
-      OBJECT_MODE: '32'
-    agents:
-      queue: libcxx-builders
-      os: aix
-    <<: *common
-
-  - label: AIX (64-bit)
-    command: libcxx/utils/ci/run-buildbot aix
-    env:
-      CC: clang
-      CXX: clang++
-      OBJECT_MODE: '64'
-    agents:
-      queue: libcxx-builders
-      os: aix
-    <<: *common
-
-- group: ':freebsd: FreeBSD'
-  steps:
-  - label: FreeBSD 13 amd64
-    command: libcxx/utils/ci/run-buildbot generic-cxx26
-    env:
-      CC: clang17
-      CXX: clang++17
-    agents:
-      queue: libcxx-builders
-      os: freebsd
-    <<: *common
-
-- group: ':android: Android'
-  steps:
-  - label: Android 5.0, x86 NDK
-    command: libcxx/utils/ci/run-buildbot android-ndk-21-def-x86
-    agents:
-      queue: libcxx-builders
-      os: android
-    <<: *common
-
-  - label: Android 13, x86_64 NDK
-    command: libcxx/utils/ci/run-buildbot android-ndk-33-goog-x86_64
-    agents:
-      queue: libcxx-builders
-      os: android
-    <<: *common
-
-
-    # TODO: Re-enable this once we've figured out how to run back-deployment testing on arm64 on recent OSes
-    # - label: "Apple back-deployment macosx11.0 arm64"
-    #   command: "libcxx/utils/ci/run-buildbot apple-system-backdeployment-11.0"
-    #   artifact_paths:
-    #     - "**/test-results.xml"
-    #     - "**/*.abilist"
-    #   agents:
-    #     queue: "libcxx-builders"
-    #     os: "macos"
-    #     arch: "arm64"
-    #   retry:
-    #     automatic:
-    #       - exit_status: -1  # Agent was lost
-    #         limit: 2
-    #   timeout_in_minutes: 120

>From 419b93ebdb300874172de4c783bd08fc5c31d02a Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 26 Jun 2024 10:30:08 -0500
Subject: [PATCH 12/12] Add missing feature for LLVM 9

---
 libcxx/utils/libcxx/test/features.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index f82495b99715f..13b71989693ee 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -686,7 +686,7 @@ def check_gdb(cfg):
 # 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 ("10", "11", "12", "13", "14", "15", "16", "17", "18", "19"):
+for version in ("9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"):
     DEFAULT_FEATURES.append(
         Feature(
             name="using-built-library-before-llvm-{}".format(version),



More information about the libcxx-commits mailing list