mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-28 16:11:29 +00:00
Allow running back-deployment testing against libc++abi
Summary: Before this patch, we could only link against the back-deployment libc++abi dylib. This patch allows linking against the just-built libc++abi, but running against the back-deployment one -- just like we do for libc++. Also, add XFAIL markup to flag expected errors.
This commit is contained in:
parent
d8d1cc647d
commit
4d79ef814a
@ -8,6 +8,7 @@ config.project_obj_root = "@CMAKE_BINARY_DIR@"
|
|||||||
config.libcxx_src_root = "@LIBCXX_SOURCE_DIR@"
|
config.libcxx_src_root = "@LIBCXX_SOURCE_DIR@"
|
||||||
config.libcxx_obj_root = "@LIBCXX_BINARY_DIR@"
|
config.libcxx_obj_root = "@LIBCXX_BINARY_DIR@"
|
||||||
config.cxx_library_root = "@LIBCXX_LIBRARY_DIR@"
|
config.cxx_library_root = "@LIBCXX_LIBRARY_DIR@"
|
||||||
|
config.abi_library_root = "@LIBCXX_CXX_ABI_LIBRARY_PATH@"
|
||||||
config.enable_exceptions = @LIBCXX_ENABLE_EXCEPTIONS@
|
config.enable_exceptions = @LIBCXX_ENABLE_EXCEPTIONS@
|
||||||
config.enable_debug_tests = @LIBCXX_ENABLE_DEBUG_MODE_SUPPORT@
|
config.enable_debug_tests = @LIBCXX_ENABLE_DEBUG_MODE_SUPPORT@
|
||||||
config.enable_experimental = @LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY@
|
config.enable_experimental = @LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY@
|
||||||
@ -18,7 +19,6 @@ config.enable_32bit = @LIBCXX_BUILD_32_BITS@
|
|||||||
config.cxx_abi = "@LIBCXX_CXX_ABI_LIBNAME@"
|
config.cxx_abi = "@LIBCXX_CXX_ABI_LIBNAME@"
|
||||||
config.use_sanitizer = "@LLVM_USE_SANITIZER@"
|
config.use_sanitizer = "@LLVM_USE_SANITIZER@"
|
||||||
config.sanitizer_library = "@LIBCXX_SANITIZER_LIBRARY@"
|
config.sanitizer_library = "@LIBCXX_SANITIZER_LIBRARY@"
|
||||||
config.abi_library_path = "@LIBCXX_CXX_ABI_LIBRARY_PATH@"
|
|
||||||
config.configuration_variant = "@LIBCXX_LIT_VARIANT@"
|
config.configuration_variant = "@LIBCXX_LIT_VARIANT@"
|
||||||
config.host_triple = "@LLVM_HOST_TRIPLE@"
|
config.host_triple = "@LLVM_HOST_TRIPLE@"
|
||||||
config.target_triple = "@TARGET_TRIPLE@"
|
config.target_triple = "@TARGET_TRIPLE@"
|
||||||
|
@ -120,6 +120,10 @@ fi
|
|||||||
LIBCXX_ROOT_ON_DEPLOYMENT_TARGET="${PREVIOUS_DYLIBS_DIR}/macOS/libc++/${DEPLOYMENT_TARGET}"
|
LIBCXX_ROOT_ON_DEPLOYMENT_TARGET="${PREVIOUS_DYLIBS_DIR}/macOS/libc++/${DEPLOYMENT_TARGET}"
|
||||||
LIBCXXABI_ROOT_ON_DEPLOYMENT_TARGET="${PREVIOUS_DYLIBS_DIR}/macOS/libc++abi/${DEPLOYMENT_TARGET}"
|
LIBCXXABI_ROOT_ON_DEPLOYMENT_TARGET="${PREVIOUS_DYLIBS_DIR}/macOS/libc++abi/${DEPLOYMENT_TARGET}"
|
||||||
|
|
||||||
|
# TODO: On Apple platforms, we never produce libc++abi.1.dylib, always libc++abi.dylib.
|
||||||
|
# Fix that in the build so that the tests stop searching for @rpath/libc++abi.1.dylib.
|
||||||
|
cp "${LIBCXXABI_ROOT_ON_DEPLOYMENT_TARGET}/libc++abi.dylib" "${LIBCXXABI_ROOT_ON_DEPLOYMENT_TARGET}/libc++abi.1.dylib"
|
||||||
|
|
||||||
# Filesystem is supported on Apple platforms starting with macosx10.15.
|
# 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
|
if [[ ${DEPLOYMENT_TARGET} =~ ^10.9|10.10|10.11|10.12|10.13|10.14$ ]]; then
|
||||||
ENABLE_FILESYSTEM="--param enable_filesystem=false"
|
ENABLE_FILESYSTEM="--param enable_filesystem=false"
|
||||||
@ -127,9 +131,8 @@ else
|
|||||||
ENABLE_FILESYSTEM="--param enable_filesystem=true"
|
ENABLE_FILESYSTEM="--param enable_filesystem=true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: We need to also run the tests for libc++abi.
|
echo "@@@ Running tests for libc++ and libc++abi @@@"
|
||||||
echo "@@@ Running tests for libc++ @@@"
|
"${LLVM_BUILD_DIR}/bin/llvm-lit" -sv "${MONOREPO_ROOT}/libcxx/test" "${MONOREPO_ROOT}/libcxxabi/test" \
|
||||||
"${LLVM_BUILD_DIR}/bin/llvm-lit" -sv "${MONOREPO_ROOT}/libcxx/test" \
|
|
||||||
--param=enable_experimental=false \
|
--param=enable_experimental=false \
|
||||||
--param=enable_debug_tests=false \
|
--param=enable_debug_tests=false \
|
||||||
${ENABLE_FILESYSTEM} \
|
${ENABLE_FILESYSTEM} \
|
||||||
@ -138,7 +141,8 @@ echo "@@@ Running tests for libc++ @@@"
|
|||||||
--param=target_triple="x86_64-apple-macosx${DEPLOYMENT_TARGET}" \
|
--param=target_triple="x86_64-apple-macosx${DEPLOYMENT_TARGET}" \
|
||||||
--param=cxx_library_root="${LLVM_INSTALL_DIR}/lib" \
|
--param=cxx_library_root="${LLVM_INSTALL_DIR}/lib" \
|
||||||
--param=cxx_runtime_root="${LIBCXX_ROOT_ON_DEPLOYMENT_TARGET}" \
|
--param=cxx_runtime_root="${LIBCXX_ROOT_ON_DEPLOYMENT_TARGET}" \
|
||||||
--param=abi_library_path="${LIBCXXABI_ROOT_ON_DEPLOYMENT_TARGET}" \
|
--param=abi_library_root="${LLVM_INSTALL_DIR}/lib" \
|
||||||
|
--param=abi_runtime_root="${LIBCXXABI_ROOT_ON_DEPLOYMENT_TARGET}" \
|
||||||
--param=use_system_cxx_lib="True" \
|
--param=use_system_cxx_lib="True" \
|
||||||
${ADDITIONAL_LIT_ARGS}
|
${ADDITIONAL_LIT_ARGS}
|
||||||
echo "@@@@@@"
|
echo "@@@@@@"
|
||||||
|
@ -243,9 +243,15 @@ x86_64-apple-system-backdeployment-*)
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
DEPLOYMENT_TARGET="${BUILDER#x86_64-apple-system-backdeployment-}"
|
DEPLOYMENT_TARGET="${BUILDER#x86_64-apple-system-backdeployment-}"
|
||||||
|
|
||||||
|
# TODO: On Apple platforms, we never produce libc++abi.1.dylib, always libc++abi.dylib.
|
||||||
|
# Fix that in the build so that the tests stop searching for @rpath/libc++abi.1.dylib.
|
||||||
|
cp "${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}/libc++abi.dylib" \
|
||||||
|
"${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}/libc++abi.1.dylib"
|
||||||
|
|
||||||
PARAMS="target_triple=x86_64-apple-macosx${DEPLOYMENT_TARGET}"
|
PARAMS="target_triple=x86_64-apple-macosx${DEPLOYMENT_TARGET}"
|
||||||
PARAMS+=";cxx_runtime_root=${OSX_ROOTS}/macOS/libc++/${DEPLOYMENT_TARGET}"
|
PARAMS+=";cxx_runtime_root=${OSX_ROOTS}/macOS/libc++/${DEPLOYMENT_TARGET}"
|
||||||
PARAMS+=";abi_library_path=${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}"
|
PARAMS+=";abi_runtime_root=${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}"
|
||||||
PARAMS+=";use_system_cxx_lib=True"
|
PARAMS+=";use_system_cxx_lib=True"
|
||||||
# Filesystem is supported on Apple platforms starting with macosx10.15.
|
# 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
|
if [[ ${DEPLOYMENT_TARGET} =~ ^10.9|10.10|10.11|10.12|10.13|10.14$ ]]; then
|
||||||
@ -258,9 +264,7 @@ x86_64-apple-system-backdeployment-*)
|
|||||||
-DLIBCXX_TEST_PARAMS="${PARAMS}" \
|
-DLIBCXX_TEST_PARAMS="${PARAMS}" \
|
||||||
-DLIBCXXABI_TEST_PARAMS="${PARAMS}"
|
-DLIBCXXABI_TEST_PARAMS="${PARAMS}"
|
||||||
|
|
||||||
# TODO: Also run the libc++abi tests
|
check-cxx-cxxabi
|
||||||
echo "+++ Running the libc++ tests"
|
|
||||||
ninja -C "${BUILD_DIR}" check-cxx
|
|
||||||
;;
|
;;
|
||||||
benchmarks)
|
benchmarks)
|
||||||
export CC=clang
|
export CC=clang
|
||||||
|
@ -29,7 +29,6 @@ class CXXCompiler(object):
|
|||||||
self.flags = list(flags or [])
|
self.flags = list(flags or [])
|
||||||
self.compile_flags = list(compile_flags or [])
|
self.compile_flags = list(compile_flags or [])
|
||||||
self.link_flags = list(link_flags or [])
|
self.link_flags = list(link_flags or [])
|
||||||
self.link_libcxxabi_flag = '-lc++abi'
|
|
||||||
self.warning_flags = list(warning_flags or [])
|
self.warning_flags = list(warning_flags or [])
|
||||||
self.verify_supported = verify_supported
|
self.verify_supported = verify_supported
|
||||||
self.use_verify = use_verify
|
self.use_verify = use_verify
|
||||||
|
@ -124,8 +124,9 @@ class Configuration(object):
|
|||||||
self.configure_obj_root()
|
self.configure_obj_root()
|
||||||
self.cxx_stdlib_under_test = self.get_lit_conf('cxx_stdlib_under_test', 'libc++')
|
self.cxx_stdlib_under_test = self.get_lit_conf('cxx_stdlib_under_test', 'libc++')
|
||||||
self.cxx_library_root = self.get_lit_conf('cxx_library_root', self.libcxx_obj_root)
|
self.cxx_library_root = self.get_lit_conf('cxx_library_root', self.libcxx_obj_root)
|
||||||
self.abi_library_root = self.get_lit_conf('abi_library_path', None)
|
self.abi_library_root = self.get_lit_conf('abi_library_root', None)
|
||||||
self.cxx_runtime_root = self.get_lit_conf('cxx_runtime_root', self.cxx_library_root)
|
self.cxx_runtime_root = self.get_lit_conf('cxx_runtime_root', self.cxx_library_root)
|
||||||
|
self.abi_runtime_root = self.get_lit_conf('abi_runtime_root', self.abi_library_root)
|
||||||
self.configure_compile_flags()
|
self.configure_compile_flags()
|
||||||
self.configure_link_flags()
|
self.configure_link_flags()
|
||||||
self.configure_env()
|
self.configure_env()
|
||||||
@ -158,6 +159,8 @@ class Configuration(object):
|
|||||||
self.lit_config.note('Adding environment variables: %r' % show_env_vars)
|
self.lit_config.note('Adding environment variables: %r' % show_env_vars)
|
||||||
self.lit_config.note("Linking against the C++ Library at {}".format(self.cxx_library_root))
|
self.lit_config.note("Linking against the C++ Library at {}".format(self.cxx_library_root))
|
||||||
self.lit_config.note("Running against the C++ Library at {}".format(self.cxx_runtime_root))
|
self.lit_config.note("Running against the C++ Library at {}".format(self.cxx_runtime_root))
|
||||||
|
self.lit_config.note("Linking against the ABI Library at {}".format(self.abi_library_root))
|
||||||
|
self.lit_config.note("Running against the ABI Library at {}".format(self.abi_runtime_root))
|
||||||
sys.stderr.flush() # Force flushing to avoid broken output on Windows
|
sys.stderr.flush() # Force flushing to avoid broken output on Windows
|
||||||
|
|
||||||
def get_test_format(self):
|
def get_test_format(self):
|
||||||
@ -423,10 +426,11 @@ class Configuration(object):
|
|||||||
# Configure ABI library paths.
|
# Configure ABI library paths.
|
||||||
if self.abi_library_root:
|
if self.abi_library_root:
|
||||||
self.cxx.link_flags += ['-L' + self.abi_library_root]
|
self.cxx.link_flags += ['-L' + self.abi_library_root]
|
||||||
|
if self.abi_runtime_root:
|
||||||
if not self.target_info.is_windows():
|
if not self.target_info.is_windows():
|
||||||
self.cxx.link_flags += ['-Wl,-rpath,' + self.abi_library_root]
|
self.cxx.link_flags += ['-Wl,-rpath,' + self.abi_runtime_root]
|
||||||
else:
|
else:
|
||||||
self.add_path(self.exec_env, self.abi_library_root)
|
self.add_path(self.exec_env, self.abi_runtime_root)
|
||||||
|
|
||||||
def configure_link_flags_cxx_library(self):
|
def configure_link_flags_cxx_library(self):
|
||||||
if self.link_shared:
|
if self.link_shared:
|
||||||
@ -460,7 +464,6 @@ class Configuration(object):
|
|||||||
if self.abi_library_root:
|
if self.abi_library_root:
|
||||||
libname = self.make_static_lib_name('c++abi')
|
libname = self.make_static_lib_name('c++abi')
|
||||||
abs_path = os.path.join(self.abi_library_root, libname)
|
abs_path = os.path.join(self.abi_library_root, libname)
|
||||||
self.cxx.link_libcxxabi_flag = abs_path
|
|
||||||
self.cxx.link_flags += [abs_path]
|
self.cxx.link_flags += [abs_path]
|
||||||
else:
|
else:
|
||||||
self.cxx.link_flags += ['-lc++abi']
|
self.cxx.link_flags += ['-lc++abi']
|
||||||
@ -590,7 +593,7 @@ class Configuration(object):
|
|||||||
sub.append(('%{flags}', ' '.join(map(pipes.quote, flags))))
|
sub.append(('%{flags}', ' '.join(map(pipes.quote, flags))))
|
||||||
sub.append(('%{compile_flags}', ' '.join(map(pipes.quote, compile_flags))))
|
sub.append(('%{compile_flags}', ' '.join(map(pipes.quote, compile_flags))))
|
||||||
sub.append(('%{link_flags}', ' '.join(map(pipes.quote, self.cxx.link_flags))))
|
sub.append(('%{link_flags}', ' '.join(map(pipes.quote, self.cxx.link_flags))))
|
||||||
sub.append(('%{link_libcxxabi}', pipes.quote(self.cxx.link_libcxxabi_flag)))
|
|
||||||
codesign_ident = self.get_lit_conf('llvm_codesign_identity', '')
|
codesign_ident = self.get_lit_conf('llvm_codesign_identity', '')
|
||||||
env_vars = ' '.join('%s=%s' % (k, pipes.quote(v)) for (k, v) in self.exec_env.items())
|
env_vars = ' '.join('%s=%s' % (k, pipes.quote(v)) for (k, v) in self.exec_env.items())
|
||||||
exec_args = [
|
exec_args = [
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
// XFAIL: gcc
|
// XFAIL: gcc
|
||||||
// UNSUPPORTED: no-exceptions
|
// UNSUPPORTED: no-exceptions
|
||||||
|
|
||||||
|
// 65ace9daa360 made it in the dylib in macOS 10.11
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.10
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.9
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
template <class Tp>
|
template <class Tp>
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
|
|
||||||
// UNSUPPORTED: no-exceptions
|
// UNSUPPORTED: no-exceptions
|
||||||
|
|
||||||
|
// 1b00fc5d8133 made it in the dylib in macOS 10.11
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.10
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.9
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
struct A
|
struct A
|
||||||
|
@ -6,6 +6,13 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// Catching an exception thrown as nullptr was not properly handled before
|
||||||
|
// 2f984cab4fa7, which landed in macOS 10.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
|
||||||
|
|
||||||
// UNSUPPORTED: no-exceptions
|
// UNSUPPORTED: no-exceptions
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
|
|
||||||
// UNSUPPORTED: no-exceptions
|
// UNSUPPORTED: no-exceptions
|
||||||
|
|
||||||
|
// 1b00fc5d8133 made it in the dylib in macOS 10.11
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.10
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.9
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
@ -6,6 +6,13 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// Catching an exception thrown as nullptr was not properly handled before
|
||||||
|
// 2f984cab4fa7, which landed in macOS 10.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
|
||||||
|
|
||||||
// UNSUPPORTED: c++03
|
// UNSUPPORTED: c++03
|
||||||
// UNSUPPORTED: no-exceptions
|
// UNSUPPORTED: no-exceptions
|
||||||
|
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97675.
|
// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97675.
|
||||||
// ADDITIONAL_COMPILE_FLAGS: -Wno-error
|
// ADDITIONAL_COMPILE_FLAGS: -Wno-error
|
||||||
|
|
||||||
|
// The fix for PR17222 made it in the dylib for macOS 10.10
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.9
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// Clang emits warnings about exceptions of type 'Child' being caught by
|
// Clang emits warnings about exceptions of type 'Child' being caught by
|
||||||
|
@ -8,6 +8,14 @@
|
|||||||
|
|
||||||
// UNSUPPORTED: no-exceptions
|
// UNSUPPORTED: no-exceptions
|
||||||
|
|
||||||
|
// PR41395 isn't fixed until the dylib shipped with macOS 10.15
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.14
|
||||||
|
// 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 "cxxabi.h"
|
#include "cxxabi.h"
|
||||||
#include <new>
|
#include <new>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -6,6 +6,16 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// PR33425 and PR33487 are not fixed until the dylib shipped with macOS 10.15
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.14
|
||||||
|
|
||||||
|
// PR33439 isn't fixed until the dylib shipped with macOS 10.14
|
||||||
|
// 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 <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// This test explicitly tests dynamic cast with types that have inaccessible
|
// This test explicitly tests dynamic cast with types that have inaccessible
|
||||||
|
@ -8,6 +8,16 @@
|
|||||||
|
|
||||||
// UNSUPPORTED: no-exceptions
|
// UNSUPPORTED: no-exceptions
|
||||||
|
|
||||||
|
// The situation for the alignment of exception objects is badly messed up
|
||||||
|
// 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: with_system_cxx_lib=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
|
||||||
|
|
||||||
// Check that the pointer __cxa_allocate_exception returns is aligned to the
|
// Check that the pointer __cxa_allocate_exception returns is aligned to the
|
||||||
// default alignment for the target architecture.
|
// default alignment for the target architecture.
|
||||||
|
|
||||||
|
@ -16,13 +16,15 @@
|
|||||||
// UNSUPPORTED: no-exceptions
|
// UNSUPPORTED: no-exceptions
|
||||||
// UNSUPPORTED: no-rtti
|
// UNSUPPORTED: no-rtti
|
||||||
|
|
||||||
// NOTE: Link libc++abi explicitly and before libc++ so that libc++ doesn't drag
|
// The fix for PR25898 landed in the system dylibs in macOS 10.13
|
||||||
// in the system libc++abi installation on OS X. (DYLD_LIBRARY_PATH is ignored
|
// XFAIL: with_system_cxx_lib=macosx10.12
|
||||||
// for shell tests because of Apple security features).
|
// XFAIL: with_system_cxx_lib=macosx10.11
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.10
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.9
|
||||||
|
|
||||||
// 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.one.o
|
||||||
// RUN: %{cxx} %{flags} %{compile_flags} -Wno-unreachable-code -c %s -o %t.two.o -DTU_ONE
|
// RUN: %{cxx} %{flags} %{compile_flags} -Wno-unreachable-code -c %s -o %t.two.o -DTU_ONE
|
||||||
// RUN: %{cxx} %{flags} %t.one.o %t.two.o %{link_libcxxabi} %{link_flags} -o %t.exe
|
// RUN: %{cxx} %{flags} %{link_flags} %t.one.o %t.two.o -o %t.exe
|
||||||
// RUN: %{exec} %t.exe
|
// RUN: %{exec} %t.exe
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -18,7 +18,7 @@ class Configuration(LibcxxConfiguration):
|
|||||||
super(Configuration, self).__init__(lit_config, config)
|
super(Configuration, self).__init__(lit_config, config)
|
||||||
self.libcxxabi_src_root = None
|
self.libcxxabi_src_root = None
|
||||||
self.libcxxabi_obj_root = None
|
self.libcxxabi_obj_root = None
|
||||||
self.abi_library_path = None
|
self.abi_library_root = None
|
||||||
self.libcxx_src_root = None
|
self.libcxx_src_root = None
|
||||||
|
|
||||||
def configure_src_root(self):
|
def configure_src_root(self):
|
||||||
|
@ -7,7 +7,7 @@ config.cxx_under_test = "@CMAKE_CXX_COMPILER@"
|
|||||||
config.project_obj_root = "@CMAKE_BINARY_DIR@"
|
config.project_obj_root = "@CMAKE_BINARY_DIR@"
|
||||||
config.libcxxabi_src_root = "@LIBCXXABI_SOURCE_DIR@"
|
config.libcxxabi_src_root = "@LIBCXXABI_SOURCE_DIR@"
|
||||||
config.libcxxabi_obj_root = "@LIBCXXABI_BINARY_DIR@"
|
config.libcxxabi_obj_root = "@LIBCXXABI_BINARY_DIR@"
|
||||||
config.abi_library_path = "@LIBCXXABI_LIBRARY_DIR@"
|
config.abi_library_root = "@LIBCXXABI_LIBRARY_DIR@"
|
||||||
config.libcxx_src_root = "@LIBCXXABI_LIBCXX_PATH@"
|
config.libcxx_src_root = "@LIBCXXABI_LIBCXX_PATH@"
|
||||||
config.cxx_headers = "@LIBCXXABI_LIBCXX_INCLUDES@"
|
config.cxx_headers = "@LIBCXXABI_LIBCXX_INCLUDES@"
|
||||||
config.libunwind_headers = "@LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL@"
|
config.libunwind_headers = "@LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL@"
|
||||||
|
@ -8,6 +8,15 @@
|
|||||||
|
|
||||||
// UNSUPPORTED: no-exceptions
|
// UNSUPPORTED: no-exceptions
|
||||||
|
|
||||||
|
// ___cxa_throw_bad_array_new_length is re-exported from libc++ only starting
|
||||||
|
// in macosx 10.15
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.14
|
||||||
|
// 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 <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
|
@ -6,6 +6,15 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// The demangler does not pass all these tests with the system dylibs on macOS.
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.15
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.14
|
||||||
|
// 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 "support/timer.h"
|
#include "support/timer.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
@ -11,10 +11,11 @@
|
|||||||
|
|
||||||
// The <unwind.h> header provided in the SDK of older Xcodes used to provide
|
// The <unwind.h> header provided in the SDK of older Xcodes used to provide
|
||||||
// an incorrectly aligned _Unwind_Exception type. That causes these tests to
|
// an incorrectly aligned _Unwind_Exception type. That causes these tests to
|
||||||
// fail with those SDKs.
|
// fail when linking against a libc++abi that was built with those SDKs.
|
||||||
// FIXME: We mark the test as unsupported on Apple until we have a Lit feature
|
// XFAIL: with_system_cxx_lib=macosx10.12
|
||||||
// representing the SDK version.
|
// XFAIL: with_system_cxx_lib=macosx10.11
|
||||||
// UNSUPPORTED: darwin
|
// XFAIL: with_system_cxx_lib=macosx10.10
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.9
|
||||||
|
|
||||||
// Test that the address of the exception object is properly aligned as required
|
// Test that the address of the exception object is properly aligned as required
|
||||||
// by the relevant ABI
|
// by the relevant ABI
|
||||||
|
@ -6,19 +6,6 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// Darwin TLV finalization routines used to fail when creating a thread-local
|
|
||||||
// variable in the destructor for another thread-local variable:
|
|
||||||
// - http://lists.llvm.org/pipermail/cfe-dev/2016-November/051376.html
|
|
||||||
// - rdar://29523281
|
|
||||||
// This was fixed in dyld in macos 10.15.
|
|
||||||
//
|
|
||||||
// XFAIL: macosx10.14
|
|
||||||
// XFAIL: macosx10.13
|
|
||||||
// XFAIL: macosx10.12
|
|
||||||
// XFAIL: macosx10.11
|
|
||||||
// XFAIL: macosx10.10
|
|
||||||
// XFAIL: macosx10.9
|
|
||||||
|
|
||||||
// UNSUPPORTED: c++03
|
// UNSUPPORTED: c++03
|
||||||
// UNSUPPORTED: libcxxabi-no-threads
|
// UNSUPPORTED: libcxxabi-no-threads
|
||||||
|
|
||||||
|
@ -8,6 +8,14 @@
|
|||||||
|
|
||||||
// UNSUPPORTED: no-exceptions
|
// UNSUPPORTED: no-exceptions
|
||||||
|
|
||||||
|
// __cxa_uncaught_exceptions is not re-exported from libc++ until macOS 10.15.
|
||||||
|
// XFAIL: with_system_cxx_lib=macosx10.14
|
||||||
|
// 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 <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ class Configuration(LibcxxConfiguration):
|
|||||||
super(Configuration, self).__init__(lit_config, config)
|
super(Configuration, self).__init__(lit_config, config)
|
||||||
self.libunwind_src_root = None
|
self.libunwind_src_root = None
|
||||||
self.libunwind_obj_root = None
|
self.libunwind_obj_root = None
|
||||||
self.abi_library_path = None
|
self.abi_library_root = None
|
||||||
self.libcxx_src_root = None
|
self.libcxx_src_root = None
|
||||||
|
|
||||||
def configure_src_root(self):
|
def configure_src_root(self):
|
||||||
|
@ -7,7 +7,7 @@ config.cxx_under_test = "@CMAKE_CXX_COMPILER@"
|
|||||||
config.project_obj_root = "@CMAKE_BINARY_DIR@"
|
config.project_obj_root = "@CMAKE_BINARY_DIR@"
|
||||||
config.libunwind_src_root = "@LIBUNWIND_SOURCE_DIR@"
|
config.libunwind_src_root = "@LIBUNWIND_SOURCE_DIR@"
|
||||||
config.libunwind_obj_root = "@LIBUNWIND_BINARY_DIR@"
|
config.libunwind_obj_root = "@LIBUNWIND_BINARY_DIR@"
|
||||||
config.abi_library_path = "@LIBUNWIND_LIBRARY_DIR@"
|
config.abi_library_root = "@LIBUNWIND_LIBRARY_DIR@"
|
||||||
config.libcxx_src_root = "@LIBUNWIND_LIBCXX_PATH@"
|
config.libcxx_src_root = "@LIBUNWIND_LIBCXX_PATH@"
|
||||||
config.libunwind_headers = "@LIBUNWIND_SOURCE_DIR@/include"
|
config.libunwind_headers = "@LIBUNWIND_SOURCE_DIR@/include"
|
||||||
config.cxx_library_root = "@LIBUNWIND_LIBCXX_LIBRARY_PATH@"
|
config.cxx_library_root = "@LIBUNWIND_LIBCXX_LIBRARY_PATH@"
|
||||||
|
Loading…
Reference in New Issue
Block a user