Skip to content

Commit 3497500

Browse files
authored
[libc++] Clean up and update deployment target features (#96312)
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. Finally, it reorders both the Lit backdeployment features and the corresponding availability macros in the library in a way that makes more sense, and reformulates the Lit backdeployment features in terms of when a version of LLVM was introduced instead of encoding the system versions on which it hasn't been introduced yet. Although one can be derived from the other, encoding the negative form is extremely error-prone. Fixes #80901
1 parent 57dabc1 commit 3497500

File tree

85 files changed

+310
-366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+310
-366
lines changed

libcxx/include/__configuration/availability.h

Lines changed: 150 additions & 128 deletions
Large diffs are not rendered by default.

libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
//
2222
// Reported as https://llvm.org/PR53170.
2323

24-
// reserve(n) used to shrink the string until https://llvm.org/D117332 was shipped.
25-
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
24+
// reserve(n) used to shrink the string until https://llvm.org/D117332 was shipped in LLVM 14.
25+
// XFAIL: using-built-library-before-llvm-14
2626

2727
#include <string>
2828
#include <stdexcept>

libcxx/test/libcxx/strings/basic.string/string.capacity/allocation_size.pass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.13|10.14|10.15|11.0}}
10-
119
// <string>
1210

1311
// This test demonstrates the smaller allocation sizes when the alignment
1412
// requirements of std::string are dropped from 16 to 8.
13+
//
14+
// XFAIL: using-built-library-before-llvm-19
15+
1516
#include <algorithm>
1617
#include <cassert>
1718
#include <cstddef>

libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
// unique_lock.
1414
// UNSUPPORTED: c++03
1515

16-
// PR30202 was fixed starting in macosx10.13.
17-
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
18-
1916
// <condition_variable>
2017

2118
// void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);

libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88

99
// UNSUPPORTED: no-threads
1010

11-
// Until 58a0a70fb2f1, this_thread::sleep_for could sometimes get interrupted
12-
// by signals and this test would fail spuriously. Disable the test on the
13-
// corresponding system libraries.
14-
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
15-
1611
// ALLOW_RETRIES: 3
1712

1813
// <thread>

libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.signals.pass.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
// This test uses the POSIX header <sys/time.h> which Windows doesn't provide
1212
// UNSUPPORTED: windows
1313

14-
// Until 58a0a70fb2f1, this_thread::sleep_for misbehaves when interrupted by
15-
// a signal, as tested here. Disable the test on the corresponding system
16-
// libraries.
17-
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
18-
1914
// ALLOW_RETRIES: 3
2015

2116
// <thread>

libcxx/test/std/depr/depr.c.headers/stdlib_h.aligned_alloc.compile.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// ::aligned_alloc is provided by the C library, but it's marked as unavailable
1515
// until macOS 10.15
16-
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
16+
// XFAIL: target={{.+}}-apple-macosx10.{{(13|14)(.0)?}}
1717

1818
// ::aligned_alloc is not implemented on Windows
1919
// XFAIL: target={{.+}}-windows-{{.+}}

libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
10-
119
// <system_error>
1210

1311
// class error_category

libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
// const error_category& system_category();
1414

15-
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
16-
1715
#include <system_error>
1816
#include <cassert>
1917
#include <string>

libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
// UNSUPPORTED: c++03, c++11, c++14
1111

1212
// The string reported on errors changed, which makes those tests fail when run
13-
// against already-released libc++'s.
14-
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
13+
// against a built library that doesn't contain 0aa637b2037d.
14+
// XFAIL: using-built-library-before-llvm-13
1515

1616
// <filesystem>
1717

0 commit comments

Comments
 (0)