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

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

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

Fixes #82107
This commit is contained in:
Louis Dionne 2024-06-21 10:31:22 -04:00 committed by GitHub
parent 60bdcc02ad
commit db8c7e004a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
102 changed files with 289 additions and 259 deletions

View File

@ -95,8 +95,8 @@
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH /* nothing */
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP /* nothing */
# define _LIBCPP_INTRODUCED_IN_LLVM_10 1
# define _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE /* nothing */
# define _LIBCPP_INTRODUCED_IN_LLVM_11 1
# define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE /* nothing */
# define _LIBCPP_INTRODUCED_IN_LLVM_12 1
# define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE /* nothing */
@ -159,22 +159,22 @@
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP /* nothing */
# endif
// LLVM 10
// LLVM 11
// clang-format off
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 140000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 140000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 70000)
// clang-format on
# define _LIBCPP_INTRODUCED_IN_LLVM_10 0
# define _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE \
# define _LIBCPP_INTRODUCED_IN_LLVM_11 0
# define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE \
__attribute__((availability(macos, strict, introduced = 11.0))) \
__attribute__((availability(ios, strict, introduced = 14.0))) \
__attribute__((availability(tvos, strict, introduced = 14.0))) \
__attribute__((availability(watchos, strict, introduced = 7.0)))
# else
# define _LIBCPP_INTRODUCED_IN_LLVM_10 1
# define _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE /* nothing */
# define _LIBCPP_INTRODUCED_IN_LLVM_11 1
# define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE /* nothing */
# endif
// LLVM 12
@ -290,8 +290,8 @@
// which requires shared library support for various operations
// (see libcxx/src/atomic.cpp). This includes <barier>, <latch>,
// <semaphore>, and notification functions on std::atomic.
#define _LIBCPP_AVAILABILITY_HAS_SYNC _LIBCPP_INTRODUCED_IN_LLVM_10
#define _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE
#define _LIBCPP_AVAILABILITY_HAS_SYNC _LIBCPP_INTRODUCED_IN_LLVM_11
#define _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE
// Enable additional explicit instantiations of iostreams components. This
// reduces the number of weak definitions generated in programs that use

View File

@ -577,7 +577,7 @@ Version 12.0
Symbol added: ___cxa_free_dependent_exception
------------
Version 10.0
Version 11.0
------------
* 54fa9ecd3088 - [libc++] Implementation of C++20's P1135R6 for libcxx

View File

@ -55,6 +55,7 @@ config.substitutions.append(('%{exec}',
))
config.stdlib = 'apple-libc++'
config.using_system_stdlib = True
libcxx.test.config.configure(
libcxx.test.params.DEFAULT_PARAMETERS + BACKDEPLOYMENT_PARAMETERS,

View File

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

View File

@ -10,7 +10,7 @@
// The fix for issue 57964 requires an updated dylib due to explicit
// instantiations. That means Apple backdeployment targets remain broken.
// UNSUPPORTED: using-built-library-before-llvm-19
// XFAIL: using-built-library-before-llvm-19
// <ios>

View File

@ -11,7 +11,7 @@
// Test exporting the symbol: "__cxa_deleted_virtual" in macosx
// But don't expect the symbol to be exported in previous versions.
//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{13|14}}
struct S { virtual void f() = delete; virtual ~S() {} };
int main(int, char**) {

View File

@ -22,7 +22,7 @@
// Reported as https://llvm.org/PR53170.
// reserve(n) used to shrink the string until https://llvm.org/D117332 was shipped.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
#include <string>
#include <stdexcept>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.13|10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.13|10.14|10.15|11.0}}
// <string>

View File

@ -14,7 +14,7 @@
// UNSUPPORTED: c++03
// PR30202 was fixed starting in macosx10.13.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// <condition_variable>

View File

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

View File

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

View File

@ -13,7 +13,7 @@
// ::aligned_alloc is provided by the C library, but it's marked as unavailable
// until macOS 10.15
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// ::aligned_alloc is not implemented on Windows
// XFAIL: target={{.+}}-windows-{{.+}}

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// <system_error>

View File

@ -12,7 +12,7 @@
// const error_category& system_category();
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
#include <system_error>
#include <cassert>

View File

@ -11,7 +11,7 @@
// The string reported on errors changed, which makes those tests fail when run
// against already-released libc++'s.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
// <filesystem>

View File

@ -11,7 +11,7 @@
// The string reported on errors changed, which makes those tests fail when run
// against already-released libc++'s.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
// Starting in Android N (API 24), SELinux policy prevents the shell user from
// creating a FIFO file.

View File

@ -11,7 +11,7 @@
// The string reported on errors changed, which makes those tests fail when run
// against already-released libc++'s.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
// Starting in Android N (API 24), SELinux policy prevents the shell user from
// creating a hard link.

View File

@ -11,7 +11,7 @@
// The string reported on errors changed, which makes those tests fail when run
// against already-released libc++'s.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
// <filesystem>

View File

@ -12,7 +12,7 @@
// The string reported on errors changed, which makes those tests fail when run
// against already-released libc++'s.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
// Starting in Android N (API 24), SELinux policy prevents the shell user from
// creating a FIFO file.

View File

@ -12,7 +12,7 @@
// UNSUPPORTED: availability-filesystem-missing
// This test requires the dylib support introduced in D92769.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
// <filesystem>

View File

@ -12,7 +12,7 @@
// UNSUPPORTED: availability-filesystem-missing
// This test requires the dylib support introduced in http://llvm.org/D92769.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
// <filesystem>

View File

@ -12,7 +12,7 @@
// UNSUPPORTED: availability-filesystem-missing
// This test requires the dylib support introduced in http://llvm.org/D92769.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
// <filesystem>

View File

@ -13,7 +13,7 @@
// The string reported on errors changed, which makes those tests fail when run
// against already-released libc++'s.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
// <filesystem>

View File

@ -13,7 +13,7 @@
// The string reported on errors changed, which makes those tests fail when run
// against already-released libc++'s.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.15|11.0}}
// <filesystem>

View File

@ -31,9 +31,9 @@
// This test requires a dylib containing the fix shipped in https://reviews.llvm.org/D118134.
// We use UNSUPPORTED instead of XFAIL because the test might not fail reliably.
// UNSUPPORTED: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
// UNSUPPORTED: stdlib=apple-libc++ && target={{.+}}-apple-macosx11.0
// UNSUPPORTED: stdlib=apple-libc++ && target={{.+}}-apple-macosx12.{{0|1|2}}
// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx11.0
// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx12.{{0|1|2}}
// Windows doesn't support the necessary APIs to mitigate this issue.
// XFAIL: target={{.+}}-windows-{{.+}}

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -8,7 +8,7 @@
// In macosx10.9 to macosx10.14, streams are provided in the dylib AND they
// have a bug in how they handle null-termination in case of errors (see D40677).
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -8,7 +8,7 @@
// In macosx10.9 to macosx10.14, streams are provided in the dylib AND they
// have a bug in how they handle null-termination in case of errors (see D40677).
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -8,7 +8,7 @@
// In macosx10.9 to macosx10.14, streams are provided in the dylib AND they
// have a bug in how they handle null-termination in case of errors (see D40677).
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -8,7 +8,7 @@
// In macosx10.9 to macosx10.14, streams are provided in the dylib AND they
// have a bug in how they handle null-termination in case of errors (see D40677).
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// <istream>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
// <istream>

View File

@ -13,8 +13,7 @@
// The fix for bug 51497 and bug 51499 require and updated dylib due to
// explicit instantiations. That means Apple backdeployment targets remain
// broken.
// TODO(#82107) Enable XFAIL.
// UNSUPPORTED: using-built-library-before-llvm-19
// XFAIL: using-built-library-before-llvm-19
#include <istream>
#include <cassert>

View File

@ -25,7 +25,7 @@
// This test exposes a regression that was not fixed yet in the libc++
// shipped with macOS 10.12, 10.13 and 10.14. See D32670 for details.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{12|13|14}}
#include <cassert>
#include <cstdint>

View File

@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.12
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.12
// <ostream>

View File

@ -16,7 +16,7 @@
// The dylibs shipped on macOS so far do not contain the fix for PR43300, so
// this test fails.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
int main(int, char**)
{

View File

@ -12,7 +12,7 @@
// when sized deallocation is not supported, e.g., prior to C++14.
// UNSUPPORTED: sanitizer-new-delete
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
// REQUIRES: -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS: -fsized-deallocation

View File

@ -12,7 +12,7 @@
// when sized deallocation is not supported, e.g., prior to C++14.
// UNSUPPORTED: sanitizer-new-delete
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
// REQUIRES: -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS: -fsized-deallocation -O3

View File

@ -9,11 +9,11 @@
// UNSUPPORTED: no-exceptions
// std::uncaught_exceptions() was introduced in the dylib on Mac OS 10.12
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
// However, std::uncaught_exceptions() gives the wrong answer in Mac OS 10.12
// and 10.13, where it only gives 0 or 1. This was fixed later.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{12|13}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{12|13}}
// test uncaught_exceptions

View File

@ -13,7 +13,7 @@
// ::aligned_alloc is provided by the C library, but it's marked as unavailable
// until macOS 10.15
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// ::aligned_alloc is not implemented on Windows
// XFAIL: target={{.+}}-windows-{{.+}}

View File

@ -16,7 +16,7 @@
// ::timespec_get is provided by the C library, but it's marked as
// unavailable until macOS 10.15
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// ::timespec_get is available starting with Android Q (API 29)
// XFAIL: target={{.+}}-android{{(eabi)?(21|22|23|24|25|26|27|28)}}

View File

@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0|13.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0|13.0}}
#include <algorithm>
#include <cassert>

View File

@ -14,8 +14,8 @@
// Before https://llvm.org/D110647, the shared library did not contain
// std::ctype<char>::table_size, so this test fails with a link error.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{11.0|12.0|13.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{11.0|12.0|13.0}}
#include <locale>
#include <cassert>

View File

@ -6,11 +6,6 @@
//
//===----------------------------------------------------------------------===//
// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed
// behavior of FP parsing, while Apple back-deployment targets remain broken due
// to the dylib.
// UNSUPPORTED: using-built-library-before-llvm-19
// <locale>
// class num_get<charT, InputIterator>

View File

@ -6,11 +6,6 @@
//
//===----------------------------------------------------------------------===//
// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed
// behavior of FP parsing, while Apple back-deployment targets remain broken due
// to the dylib.
// UNSUPPORTED: using-built-library-before-llvm-19
// <locale>
// class num_get<charT, InputIterator>

View File

@ -15,7 +15,7 @@
// This test exercises the fix for PR28704, which isn't in the dylib for
// some systems.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
#include <locale>
#include <ios>

View File

@ -6,11 +6,6 @@
//
//===----------------------------------------------------------------------===//
// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed
// behavior of FP parsing, while Apple back-deployment targets remain broken due
// to the dylib.
// UNSUPPORTED: using-built-library-before-llvm-19
// <locale>
// class num_get<charT, InputIterator>

View File

@ -18,7 +18,7 @@
// This test exercises the fix for locale name construction (D119441), which
// isn't in the dylib for some systems.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
#include <locale>
#include <cassert>

View File

@ -7,11 +7,11 @@
//===----------------------------------------------------------------------===//
// See https://llvm.org/PR20183
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
// The behavior of std::random_device changed on Apple platforms with
// https://llvm.org/D116045.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
// UNSUPPORTED: no-random-device

View File

@ -11,7 +11,7 @@
// After changing the alignment of the allocated pointer from 16 to 8, the exception thrown is no longer `bad_alloc`
// but instead length_error on systems using new headers but older dylibs.
//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.13|10.15|11.0}}
// XFAIL: using-built-library-before-llvm-18
// <string>

View File

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

View File

@ -12,7 +12,7 @@
// This test relies on https://llvm.org/PR45368 being fixed, which isn't in
// older Apple dylibs
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
#include <string>
#include <stdexcept>

View File

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

View File

@ -11,7 +11,7 @@
// LWG 2056 changed the values of future_errc, so if we're using new headers
// with an old library we'll get incorrect messages.
//
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11}}
// VC Runtime's std::exception::what() method is not marked as noexcept, so
// this fails.

View File

@ -14,8 +14,8 @@
// The fix of LWG3343 is done in the dylib. That means Apple backdeployment
// targets remain broken. Due to the nature of the test, testing on a broken
// system does not guarantee that the test fails, so the test can't use XFAIL.
// UNSUPPORTED: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{.+}}
// UNSUPPORTED: stdlib=apple-libc++ && target={{.+}}-apple-macosx11.{{.+}}
// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx10.{{.+}}
// UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx11.{{.+}}
// This is a regression test for LWG3343.
//

View File

@ -11,7 +11,7 @@
// Aligned allocations are not supported on macOS < 10.13
// Note: use 'unsupported' instead of 'xfail' to ensure
// we won't pass prior to c++17.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS

View File

@ -89,8 +89,8 @@ steps:
<<: *common
# Build with the configuration we use to generate libc++.dylib on Apple platforms
- label: Apple system
command: libcxx/utils/ci/run-buildbot apple-system
- label: Apple system configuration
command: libcxx/utils/ci/run-buildbot apple-configuration
agents:
queue: libcxx-builders
os: macos

View File

@ -514,7 +514,7 @@ generic-optimized-speed)
generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-optimized-speed.cmake"
check-runtimes
;;
apple-system)
apple-configuration)
clean
arch="$(uname -m)"

View File

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

View File

@ -264,6 +264,19 @@ DEFAULT_PARAMETERS = [
],
),
),
Parameter(
name="using_system_stdlib",
choices=[True, False],
type=bool,
default=False,
help="""Whether the Standard Library being tested is the one that shipped with the system by default.
This is different from the 'stdlib' parameter, which describes the flavor of libc++ being
tested. 'using_system_stdlib' describes whether the target system passed with 'target_triple'
also corresponds to the version of the library being tested.
""",
actions=lambda is_system: [AddFeature("stdlib=system")] if is_system else [],
),
Parameter(
name="enable_warnings",
choices=[True, False],

View File

@ -14,7 +14,7 @@
// UNSUPPORTED: no-exceptions
// 65ace9daa360 made it in the dylib in macOS 10.11
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10}}
#include <cassert>

View File

@ -11,7 +11,7 @@
// UNSUPPORTED: no-exceptions
// Support for catching a function pointer including noexcept was shipped in macOS 10.13
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
#include <cassert>

View File

@ -9,7 +9,7 @@
// UNSUPPORTED: no-exceptions
// 1b00fc5d8133 made it in the dylib in macOS 10.11
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10}}
#include <cassert>

View File

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

View File

@ -8,7 +8,7 @@
// Catching an exception thrown as nullptr was not properly handled before
// 2f984cab4fa7, which landed in macOS 10.13
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// UNSUPPORTED: no-exceptions

View File

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

View File

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

View File

@ -8,7 +8,7 @@
// Catching an exception thrown as nullptr was not properly handled before
// 2f984cab4fa7, which landed in macOS 10.13
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// UNSUPPORTED: c++03
// UNSUPPORTED: no-exceptions

View File

@ -14,7 +14,7 @@
// ADDITIONAL_COMPILE_FLAGS: -Wno-exceptions
// The fix for PR17222 made it in the dylib for macOS 10.10
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.9
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.9
#include <cassert>
#include <stdint.h>

View File

@ -56,6 +56,7 @@ config.substitutions.append(('%{exec}',
))
config.stdlib = 'apple-libc++'
config.using_system_stdlib = True
libcxx.test.config.configure(
libcxx.test.params.DEFAULT_PARAMETERS + BACKDEPLOYMENT_PARAMETERS,

View File

@ -9,7 +9,7 @@
// UNSUPPORTED: no-exceptions
// PR41395 isn't fixed until the dylib shipped with macOS 10.15
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
#include "cxxabi.h"
#include <new>

View File

@ -7,10 +7,10 @@
//===----------------------------------------------------------------------===//
// PR33425 and PR33487 are not fixed until the dylib shipped with macOS 10.15
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.14
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.14
// PR33439 isn't fixed until the dylib shipped with macOS 10.14
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13}}
#include <cassert>

View File

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

View File

@ -15,8 +15,8 @@
// UNSUPPORTED: target={{ve-.*}}
// These tests fail on previously released dylibs, investigation needed.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{11.0|12.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{11.0|12.0}}
#include <stdlib.h>
#include <string.h>

View File

@ -14,8 +14,8 @@
// UNSUPPORTED: target={{ve-.*}}
// These tests fail on previously released dylibs, investigation needed.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{11.0|12.0}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx{{11.0|12.0}}
#include <exception>
#include <stdlib.h>

View File

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

View File

@ -10,7 +10,7 @@
// ___cxa_throw_bad_array_new_length is re-exported from libc++ only starting
// in macosx 10.15
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
#include <cxxabi.h>
#include <new>

View File

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

View File

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

View File

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

View File

@ -9,7 +9,7 @@
// UNSUPPORTED: no-exceptions
// __cxa_uncaught_exceptions is not re-exported from libc++ until macOS 10.15.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
// XFAIL: stdlib=system && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
#include <cxxabi.h>
#include <cassert>

Some files were not shown because too many files have changed in this diff Show More