[libcxx] Remove the 'availability' Lit feature
authorLouis Dionne <ldionne@apple.com>
Fri, 11 Sep 2020 15:05:22 +0000 (11:05 -0400)
committerLouis Dionne <ldionne@apple.com>
Fri, 11 Sep 2020 15:34:49 +0000 (11:34 -0400)
Instead, use with_system_cxx_lib with various compile-only tests to ensure
that we're getting compile-time errors, as expected. This follows the
lead of ec46cfefe80d5.

20 files changed:
libcxx/docs/DesignDocs/AvailabilityMarkup.rst
libcxx/test/libcxx/language.support/support.dynamic/aligned_alloc_availability.verify.cpp [new file with mode: 0644]
libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
libcxx/test/libcxx/memory/aligned_allocation_macro.compile.pass.cpp [moved from libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp with 79% similarity]
libcxx/test/libcxx/thread/atomic.availability.verify.cpp
libcxx/test/libcxx/thread/barrier.availability.verify.cpp
libcxx/test/libcxx/thread/latch.availability.verify.cpp
libcxx/test/libcxx/thread/semaphore.availability.verify.cpp
libcxx/test/libcxx/utilities/charconv/charconv.to.chars/availability.fail.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.pass.cpp
libcxx/utils/libcxx/test/config.py

index 2380385..26975a7 100644 (file)
@@ -78,8 +78,6 @@ the following features will be made available:
   - with_system_cxx_lib=macosx
   - with_system_cxx_lib=macosx10.12
   - with_system_cxx_lib=x86_64-apple-macosx10.12
-  - availability=macosx
-  - availability=macosx10.12
 
 These features are used to XFAIL a test that fails when deployed on (or is
 compiled for) an older system. For example, if the test exhibits a bug in the
diff --git a/libcxx/test/libcxx/language.support/support.dynamic/aligned_alloc_availability.verify.cpp b/libcxx/test/libcxx/language.support/support.dynamic/aligned_alloc_availability.verify.cpp
new file mode 100644 (file)
index 0000000..aa75b70
--- /dev/null
@@ -0,0 +1,61 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// Make sure we get compile-time availability errors when trying to use aligned
+// allocation/deallocation on deployment targets that don't support it.
+
+// UNSUPPORTED: c++03, c++11, c++14
+
+// Aligned allocation was not provided before macosx10.14.
+// Support for that is broken prior to Clang 8 and Apple Clang 11.
+// UNSUPPORTED: apple-clang-9, apple-clang-10
+// UNSUPPORTED: clang-5, clang-6, clang-7
+
+// REQUIRES: with_system_cxx_lib=macosx10.13 || \
+// REQUIRES: with_system_cxx_lib=macosx10.12 || \
+// REQUIRES: with_system_cxx_lib=macosx10.11 || \
+// REQUIRES: with_system_cxx_lib=macosx10.10 || \
+// REQUIRES: with_system_cxx_lib=macosx10.9
+
+#include <new>
+#include <cstddef>
+
+#include "test_macros.h"
+
+constexpr auto OverAligned = __STDCPP_DEFAULT_NEW_ALIGNMENT__ * 2;
+
+struct alignas(OverAligned) A { };
+
+int main(int, char**)
+{
+    // Normal versions
+    {
+        A *a1 = new A; // expected-error-re {{aligned allocation function of type {{.+}} is only available on}}
+        // `delete` is also required by the line above if construction fails
+        // expected-error-re@-2 {{aligned deallocation function of type {{.+}} is only available on}}
+
+        delete a1; // expected-error-re {{aligned deallocation function of type {{.+}} is only available on}}
+
+        A* a2 = new(std::nothrow) A; // expected-error-re {{aligned allocation function of type {{.+}} is only available on}}
+        // `delete` is also required above for the same reason
+        // expected-error-re@-2 {{aligned deallocation function of type {{.+}} is only available on}}
+    }
+
+    // Array versions
+    {
+        A *a1 = new A[2]; // expected-error-re {{aligned allocation function of type {{.+}} is only available on}}
+        // `delete` is also required by the line above if construction fails
+        // expected-error-re@-2 {{aligned deallocation function of type {{.+}} is only available on}}
+
+        delete[] a1; // expected-error-re {{aligned deallocation function of type {{.+}} is only available on}}
+
+        A* a2 = new(std::nothrow) A[2]; // expected-error-re {{aligned allocation function of type {{.+}} is only available on}}
+        // `delete` is also required above for the same reason
+        // expected-error-re@-2 {{aligned deallocation function of type {{.+}} is only available on}}
+    }
+}
index 6ed7e75..0d67cda 100644 (file)
 // XFAIL: with_system_cxx_lib=macosx10.10
 // XFAIL: with_system_cxx_lib=macosx10.9
 
-// The test will fail on deployment targets that do not support sized deallocation.
-// XFAIL: availability=macosx10.11
-// XFAIL: availability=macosx10.10
-// XFAIL: availability=macosx10.9
-
 // AppleClang < 10 incorrectly warns that aligned allocation is not supported
 // even when it is supported.
 // UNSUPPORTED: apple-clang-9
 // GCC 5 doesn't support aligned allocation
 // UNSUPPORTED: gcc-5
 
-// XFAIL: availability=macosx10.13
-// XFAIL: availability=macosx10.12
-// XFAIL: availability=macosx10.11
-// XFAIL: availability=macosx10.10
-// XFAIL: availability=macosx10.9
+// XFAIL: with_system_cxx_lib=macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
 
 #include <new>
 
@@ -29,7 +29,3 @@
 #ifdef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
 #   error "libc++ should have aligned allocation in C++17 and up when targeting a platform that supports it"
 #endif
-
-int main(int, char**) {
-  return 0;
-}
index 45028da..643e591 100644 (file)
@@ -7,8 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// REQUIRES: with_system_cxx_lib=macosx
-// REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15
+// REQUIRES: with_system_cxx_lib=macosx10.9 || \
+// REQUIRES: with_system_cxx_lib=macosx10.10 || \
+// REQUIRES: with_system_cxx_lib=macosx10.11 || \
+// REQUIRES: with_system_cxx_lib=macosx10.12 || \
+// REQUIRES: with_system_cxx_lib=macosx10.13 || \
+// REQUIRES: with_system_cxx_lib=macosx10.14 || \
+// REQUIRES: with_system_cxx_lib=macosx10.15
 
 // Test the availability markup on the C++20 Synchronization Library
 // additions to <atomic>.
index 16d67fb..f8537f5 100644 (file)
@@ -7,8 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// REQUIRES: with_system_cxx_lib=macosx
-// REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15
+// REQUIRES: with_system_cxx_lib=macosx10.9 || \
+// REQUIRES: with_system_cxx_lib=macosx10.10 || \
+// REQUIRES: with_system_cxx_lib=macosx10.11 || \
+// REQUIRES: with_system_cxx_lib=macosx10.12 || \
+// REQUIRES: with_system_cxx_lib=macosx10.13 || \
+// REQUIRES: with_system_cxx_lib=macosx10.14 || \
+// REQUIRES: with_system_cxx_lib=macosx10.15
 
 // Test the availability markup on std::barrier.
 
index f468ebf..25a1610 100644 (file)
@@ -7,8 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// REQUIRES: with_system_cxx_lib=macosx
-// REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15
+// REQUIRES: with_system_cxx_lib=macosx10.9 || \
+// REQUIRES: with_system_cxx_lib=macosx10.10 || \
+// REQUIRES: with_system_cxx_lib=macosx10.11 || \
+// REQUIRES: with_system_cxx_lib=macosx10.12 || \
+// REQUIRES: with_system_cxx_lib=macosx10.13 || \
+// REQUIRES: with_system_cxx_lib=macosx10.14 || \
+// REQUIRES: with_system_cxx_lib=macosx10.15
 
 // Test the availability markup on std::latch.
 
index 5d92461..284ee96 100644 (file)
@@ -7,8 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// REQUIRES: with_system_cxx_lib=macosx
-// REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15
+// REQUIRES: with_system_cxx_lib=macosx10.9 || \
+// REQUIRES: with_system_cxx_lib=macosx10.10 || \
+// REQUIRES: with_system_cxx_lib=macosx10.11 || \
+// REQUIRES: with_system_cxx_lib=macosx10.12 || \
+// REQUIRES: with_system_cxx_lib=macosx10.13 || \
+// REQUIRES: with_system_cxx_lib=macosx10.14 || \
+// REQUIRES: with_system_cxx_lib=macosx10.15
 
 // Test the availability markup on std::counting_semaphore and std::binary_semaphore.
 
index cd09942..70f5d3c 100644 (file)
@@ -7,8 +7,12 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03
-// REQUIRES: with_system_cxx_lib=macosx
-// REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14
+// REQUIRES: with_system_cxx_lib=macosx10.9 || \
+// REQUIRES: with_system_cxx_lib=macosx10.10 || \
+// REQUIRES: with_system_cxx_lib=macosx10.11 || \
+// REQUIRES: with_system_cxx_lib=macosx10.12 || \
+// REQUIRES: with_system_cxx_lib=macosx10.13 || \
+// REQUIRES: with_system_cxx_lib=macosx10.14
 
 // Test the availability markup on std::to_chars.
 
index b092fa1..eb7f5ad 100644 (file)
 
 // Aligned allocation was not provided before macosx10.14 and as a result we
 // get availability errors when the deployment target is older than macosx10.14.
-// However, AppleClang 10 (and older) don't trigger availability errors, and
-// Clang < 8.0 doesn't warn for 10.13.
-// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9
-
-// On AppleClang 10 (and older), instead of getting an availability failure
-// like above, we get a link error when we link against a dylib that does
-// not export the aligned allocation functions.
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9
+// However, support for that was broken prior to Clang 8 and AppleClang 11.
+// UNSUPPORTED: apple-clang-9, apple-clang-10
+// UNSUPPORTED: clang-5, clang-6, clang-7
+// XFAIL: with_system_cxx_lib=macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
 
 // On Windows libc++ doesn't provide its own definitions for new/delete
 // but instead depends on the ones in VCRuntime. However VCRuntime does not
index bfa5f15..6b372e0 100644 (file)
 
 // Aligned allocation was not provided before macosx10.14 and as a result we
 // get availability errors when the deployment target is older than macosx10.14.
-// However, AppleClang 10 (and older) don't trigger availability errors, and
-// Clang < 8.0 doesn't warn for 10.13.
-// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9
-
-// On AppleClang 10 (and older), instead of getting an availability failure
-// like above, we get a link error when we link against a dylib that does
-// not export the aligned allocation functions.
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9
+// However, support for that was broken prior to Clang 8 and AppleClang 11.
+// UNSUPPORTED: apple-clang-9, apple-clang-10
+// UNSUPPORTED: clang-5, clang-6, clang-7
+// XFAIL: with_system_cxx_lib=macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
 
 // On Windows libc++ doesn't provide its own definitions for new/delete
 // but instead depends on the ones in VCRuntime. However VCRuntime does not
index 869e29a..e9e9d95 100644 (file)
 
 // Aligned allocation was not provided before macosx10.14 and as a result we
 // get availability errors when the deployment target is older than macosx10.14.
-// However, AppleClang 10 (and older) don't trigger availability errors, and
-// Clang < 8.0 doesn't warn for 10.13.
-// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9
-
-// On AppleClang 10 (and older), instead of getting an availability failure
-// like above, we get a link error when we link against a dylib that does
-// not export the aligned allocation functions.
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9
+// However, support for that was broken prior to Clang 8 and AppleClang 11.
+// UNSUPPORTED: apple-clang-9, apple-clang-10
+// UNSUPPORTED: clang-5, clang-6, clang-7
+// XFAIL: with_system_cxx_lib=macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
 
 // On Windows libc++ doesn't provide its own definitions for new/delete
 // but instead depends on the ones in VCRuntime. However VCRuntime does not
index 6f346a7..e7a1e40 100644 (file)
 
 // Aligned allocation was not provided before macosx10.14 and as a result we
 // get availability errors when the deployment target is older than macosx10.14.
-// However, AppleClang 10 (and older) don't trigger availability errors, and
-// Clang < 8.0 doesn't warn for 10.13.
-// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9
-
-// On AppleClang 10 (and older), instead of getting an availability failure
-// like above, we get a link error when we link against a dylib that does
-// not export the aligned allocation functions.
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9
+// However, support for that was broken prior to Clang 8 and AppleClang 11.
+// UNSUPPORTED: apple-clang-9, apple-clang-10
+// UNSUPPORTED: clang-5, clang-6, clang-7
+// XFAIL: with_system_cxx_lib=macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
 
 // On Windows libc++ doesn't provide its own definitions for new/delete
 // but instead depends on the ones in VCRuntime. However VCRuntime does not
index cdebcda..1274ddf 100644 (file)
 // when sized deallocation is not supported, e.g., prior to C++14.
 
 // UNSUPPORTED: sanitizer-new-delete
-// XFAIL: availability=macosx10.11
-// XFAIL: availability=macosx10.10
-// XFAIL: availability=macosx10.9
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
 
-
-// NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation.
 // REQUIRES: -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS: -fsized-deallocation
 
index f50507a..4d0100d 100644 (file)
 
 // Aligned allocation was not provided before macosx10.14 and as a result we
 // get availability errors when the deployment target is older than macosx10.14.
-// However, AppleClang 10 (and older) don't trigger availability errors, and
-// Clang < 8.0 doesn't warn for 10.13
-// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9
-
-// On AppleClang 10 (and older), instead of getting an availability failure
-// like above, we get a link error when we link against a dylib that does
-// not export the aligned allocation functions.
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9
+// However, support for that was broken prior to Clang 8 and AppleClang 11.
+// UNSUPPORTED: apple-clang-9, apple-clang-10
+// UNSUPPORTED: clang-5, clang-6, clang-7
+// XFAIL: with_system_cxx_lib=macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
 
 // On Windows libc++ doesn't provide its own definitions for new/delete
 // but instead depends on the ones in VCRuntime. However VCRuntime does not
index 80ec88e..01cb886 100644 (file)
 
 // Aligned allocation was not provided before macosx10.14 and as a result we
 // get availability errors when the deployment target is older than macosx10.14.
-// However, AppleClang 10 (and older) don't trigger availability errors, and
-// Clang < 8.0 doesn't warn for 10.13.
-// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9
-
-// On AppleClang 10 (and older), instead of getting an availability failure
-// like above, we get a link error when we link against a dylib that does
-// not export the aligned allocation functions.
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9
+// However, support for that was broken prior to Clang 8 and AppleClang 11.
+// UNSUPPORTED: apple-clang-9, apple-clang-10
+// UNSUPPORTED: clang-5, clang-6, clang-7
+// XFAIL: with_system_cxx_lib=macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
 
 // asan and msan will not call the new handler.
 // UNSUPPORTED: sanitizer-new-delete
index 0a42fba..930eff9 100644 (file)
 
 // Aligned allocation was not provided before macosx10.14 and as a result we
 // get availability errors when the deployment target is older than macosx10.14.
-// However, AppleClang 10 (and older) don't trigger availability errors, and
-// Clang < 8.0 doesn't warn for 10.13
-// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9
-
-// On AppleClang 10 (and older), instead of getting an availability failure
-// like above, we get a link error when we link against a dylib that does
-// not export the aligned allocation functions.
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9
+// However, support for that was broken prior to Clang 8 and AppleClang 11.
+// UNSUPPORTED: apple-clang-9, apple-clang-10
+// UNSUPPORTED: clang-5, clang-6, clang-7
+// XFAIL: with_system_cxx_lib=macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
 
 // asan and msan will not call the new handler.
 // UNSUPPORTED: sanitizer-new-delete
index 655ec93..62ceafb 100644 (file)
 
 // Aligned allocation was not provided before macosx10.14 and as a result we
 // get availability errors when the deployment target is older than macosx10.14.
-// However, AppleClang 10 (and older) don't trigger availability errors, and
-// Clang < 8.0 doesn't warn for 10.13
-// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9
-
-// On AppleClang 10 (and older), instead of getting an availability failure
-// like above, we get a link error when we link against a dylib that does
-// not export the aligned allocation functions.
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10
-// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9
+// However, support for that was broken prior to Clang 8 and AppleClang 11.
+// UNSUPPORTED: apple-clang-9, apple-clang-10
+// UNSUPPORTED: clang-5, clang-6, clang-7
+// XFAIL: with_system_cxx_lib=macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
 
 // On Windows libc++ doesn't provide its own definitions for new/delete
 // but instead depends on the ones in VCRuntime. However VCRuntime does not
index e827ff6..22ea35e 100644 (file)
@@ -12,9 +12,9 @@
 // when sized deallocation is not supported, e.g., prior to C++14.
 
 // UNSUPPORTED: sanitizer-new-delete
-// XFAIL: availability=macosx10.11
-// XFAIL: availability=macosx10.10
-// XFAIL: availability=macosx10.9
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
 
 // NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation.
 // REQUIRES: -fsized-deallocation
index 42438b3..fdc8bbc 100644 (file)
@@ -252,9 +252,6 @@ class Configuration(object):
             self.config.available_features.add('with_system_cxx_lib={}{}'.format(sysname, version))
             self.config.available_features.add('with_system_cxx_lib={}'.format(sysname))
 
-            self.config.available_features.add('availability={}'.format(sysname))
-            self.config.available_features.add('availability={}{}'.format(sysname, version))
-
         if self.target_info.is_windows():
             if self.cxx_stdlib_under_test == 'libc++':
                 # LIBCXX-WINDOWS-FIXME is the feature name used to XFAIL the