};
template <size_t... _Ns, class _Fp, class _Rp, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
static constexpr auto __make_vtable_impl(_Fp __f, _Rp (*)(_Args...)) {
array<_Rp (*)(_Args...), (1 * ... * _Ns) + 1> __result = {
[](_Args...) -> _Rp { __throw_bad_variant_access(); }
};
template <class _Vis, class _Vp, class _Wp>
- inline _LIBCPP_INLINE_VISIBILITY
+ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
static constexpr decltype(auto)
__visit_alt_at(size_t __index, _Vis&& __vis, _Vp&& __v, _Wp&& __w) {
constexpr size_t __size = __uncvref_t<_Vp>::__size();
}
template <size_t... _Is, class _Vis, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
static constexpr decltype(auto)
__visit_alt_impl(index_sequence<_Is...>, _Vis&& __vis, _Vs&&... __vs) {
using __multi = __multi<__uncvref_t<_Vs>::__size()...>;
// unique_lock.
// UNSUPPORTED: c++03
+// PR30202 was fixed starting in macosx10.13.
+// UNSUPPORTED: with_system_cxx_lib=macosx10.12
+// UNSUPPORTED: with_system_cxx_lib=macosx10.11
+// UNSUPPORTED: with_system_cxx_lib=macosx10.10
+// UNSUPPORTED: with_system_cxx_lib=macosx10.9
+
// <condition_variable>
-// void
-// notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
+// void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
// Test that this function works with threads that were not created by
-// std::thread. See: https://bugs.llvm.org/show_bug.cgi?id=30202
+// std::thread. See https://llvm.org/PR30202
#include <condition_variable>
// UNSUPPORTED: libcpp-has-no-threads
-// Until 58a0a70fb2f1, this_thread::sleep_for could get interrupted by
-// signals and this test would fail. Disable the test on the corresponding
-// system libraries.
-// XFAIL: with_system_cxx_lib=macosx10.11
-// XFAIL: with_system_cxx_lib=macosx10.10
-// XFAIL: with_system_cxx_lib=macosx10.9
+// 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.
+// UNSUPPORTED: with_system_cxx_lib=macosx10.11
+// UNSUPPORTED: with_system_cxx_lib=macosx10.10
+// UNSUPPORTED: with_system_cxx_lib=macosx10.9
// <thread>
// This test uses the POSIX header <sys/time.h> which Windows doesn't provide
// UNSUPPORTED: windows
-// Until 58a0a70fb2f1, this_thread::sleep_for could get interrupted by
-// signals and this test would fail. Disable the test on the corresponding
-// system libraries.
+// Until 58a0a70fb2f1, this_thread::sleep_for misbehaves when interrupted by
+// a signal, as tested here. Disable the test on the corresponding system
+// libraries.
// XFAIL: with_system_cxx_lib=macosx10.11
// XFAIL: with_system_cxx_lib=macosx10.10
// XFAIL: with_system_cxx_lib=macosx10.9
// UNSUPPORTED: c++03, c++11, c++14
+// Throwing bad_variant_access is supported starting in macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
+
// <variant>
// template <class... Types> struct hash<variant<Types...>>;
// UNSUPPORTED: c++03, c++11, c++14
+// Throwing bad_variant_access is supported starting in macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
+
// <variant>
// template <class ...Types>
// UNSUPPORTED: c++03, c++11, c++14
+// Throwing bad_variant_access is supported starting in macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
+
// <variant>
// template <class ...Types>
// UNSUPPORTED: c++03, c++11, c++14
+// Throwing bad_variant_access is supported starting in macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
+
// <variant>
// template <class ...Types> class variant;
// UNSUPPORTED: c++03, c++11, c++14
+// Throwing bad_variant_access is supported starting in macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
+
// <variant>
// template <class ...Types> class variant;
// UNSUPPORTED: c++03, c++11, c++14
+// Throwing bad_variant_access is supported starting in macosx10.13
+// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
+// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
+
// <variant>
// template <class ...Types> class variant;
automatic:
- exit_status: -1 # Agent was lost
limit: 2
+
+ # Test back-deployment to older Apple platforms
+ - label: "Apple back-deployment macosx10.9"
+ command: "libcxx/utils/ci/run-buildbot.sh x86_64-apple-system-backdeployment-10.9"
+ artifact_paths:
+ - "**/test-results.xml"
+ agents:
+ queue: "libcxx-macos-builders"
+ retry:
+ automatic:
+ - exit_status: -1 # Agent was lost
+ limit: 2
-DLLVM_ENABLE_PROJECTS="libcxx;libunwind;libcxxabi" \
-DLLVM_LIT_ARGS="-sv --show-unsupported --xunit-xml-output test-results.xml" \
-DLIBCXX_CXX_ABI=libcxxabi \
- ${@}
+ "${@}"
+}
+
+function download-osx-roots() {
+ echo "--- Downloading previous macOS dylibs"
+ PREVIOUS_DYLIBS_URL="http://lab.llvm.org:8080/roots/libcxx-roots.tar.gz"
+ mkdir -p "${BUILD_DIR}/macos-roots"
+ curl "${PREVIOUS_DYLIBS_URL}" | tar -xz --strip-components=1 -C "${BUILD_DIR}/macos-roots"
}
function check-cxx-cxxabi() {
-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF
check-cxx-cxxabi
;;
+x86_64-apple-system-backdeployment-*)
+ DEPLOYMENT_TARGET="${BUILDER#x86_64-apple-system-backdeployment-}"
+ PARAMS="target_triple=x86_64-apple-macosx${DEPLOYMENT_TARGET}"
+ PARAMS+=";cxx_runtime_root=${BUILD_DIR}/macos-roots/macOS/libc++/${DEPLOYMENT_TARGET}"
+ PARAMS+=";abi_library_path=${BUILD_DIR}/macos-roots/macOS/libc++abi/${DEPLOYMENT_TARGET}"
+ PARAMS+=";use_system_cxx_lib=True"
+ # Filesystem is supported on Apple platforms starting with macosx10.15.
+ if [[ ${DEPLOYMENT_TARGET} =~ ^10.9|10.10|10.11|10.12|10.13|10.14$ ]]; then
+ PARAMS+=";enable_filesystem=False"
+ fi
+
+ export CC=clang
+ export CXX=clang++
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Apple.cmake" \
+ -DLIBCXX_TEST_PARAMS="${PARAMS}" \
+ -DLIBCXXABI_TEST_PARAMS="${PARAMS}"
+ download-osx-roots
+
+ # TODO: Also run the libc++abi tests
+ echo "+++ Running the libc++ tests"
+ ninja -C "${BUILD_DIR}" check-cxx
+;;
benchmarks)
export CC=clang
export CXX=clang++