-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc++] Clean up and update deployment target features #96312
[libc++] Clean up and update deployment target features #96312
Conversation
@llvm/pr-subscribers-github-workflow @llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) ChangesThis 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 Patch is 68.54 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/96312.diff 84 Files Affected:
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/io...
[truncated]
|
Related to the clean-up effort here, I think the following is wrong: llvm-project/libcxx/utils/libcxx/test/features.py Lines 622 to 628 in ba2f496
in that this should (most likely) be 14.[0-3] , and not 12.[0-3] (which is already covered by _target-before-llvm-13 )
|
Thanks, that's a great catch! We don't currently run back-deployment bots on these OSes so that's why the CI didn't complain. |
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 llvm#80901
31ed0f1
to
e7bc9d7
Compare
when=lambda cfg: BooleanExpression.evaluate( | ||
"stdlib=system && _target-before-llvm-{}".format(version), | ||
when=lambda cfg, v=version: BooleanExpression.evaluate( | ||
"stdlib=system && !_target-has-llvm-{}".format(v), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know this can work for using-built-library-before-llvm-{18,19}
(which are being used), since _target-has-llvm-{18,19}
are undefined. Presumably an unknown quantity is always false? That seems fragile IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Lit, a feature is either defined (in which case it is truthy) or it is not defined (falsy). We don’t define _target-has-llvm-18 since no released OS contains it, which seems reasonable. The rest kinda falls out of this.
I am also not a huge fan, ideally we would be able to compare versions in Lit so we could avoid the awkward definition of these _target features in the first place. But given the status quo, I don’t know how to do this differently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, as long as it's intentional... :)
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 llvm#80901
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