[libcxxabi] r296940 - Fix PR25874 - Detect features required for cxa_thread_atexit_test.pass.cpp
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 3 17:26:41 PST 2017
Author: ericwf
Date: Fri Mar 3 19:26:41 2017
New Revision: 296940
URL: http://llvm.org/viewvc/llvm-project?rev=296940&view=rev
Log:
Fix PR25874 - Detect features required for cxa_thread_atexit_test.pass.cpp
Modified:
libcxxabi/trunk/test/CMakeLists.txt
libcxxabi/trunk/test/cxa_thread_atexit_test.pass.cpp
libcxxabi/trunk/test/libcxxabi/test/config.py
libcxxabi/trunk/test/lit.site.cfg.in
Modified: libcxxabi/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/CMakeLists.txt?rev=296940&r1=296939&r2=296940&view=diff
==============================================================================
--- libcxxabi/trunk/test/CMakeLists.txt (original)
+++ libcxxabi/trunk/test/CMakeLists.txt Fri Mar 3 19:26:41 2017
@@ -18,6 +18,7 @@ pythonize_bool(LIBCXXABI_ENABLE_THREADS)
pythonize_bool(LIBCXXABI_ENABLE_EXCEPTIONS)
pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
pythonize_bool(LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY)
+pythonize_bool(LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
set(LIBCXXABI_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING
"TargetInfo to use when setting up test environment.")
set(LIBCXXABI_EXECUTOR "None" CACHE STRING
Modified: libcxxabi/trunk/test/cxa_thread_atexit_test.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/cxa_thread_atexit_test.pass.cpp?rev=296940&r1=296939&r2=296940&view=diff
==============================================================================
--- libcxxabi/trunk/test/cxa_thread_atexit_test.pass.cpp (original)
+++ libcxxabi/trunk/test/cxa_thread_atexit_test.pass.cpp Fri Mar 3 19:26:41 2017
@@ -10,6 +10,11 @@
// UNSUPPORTED: libcxxabi-no-threads
// REQUIRES: linux
+// this test will only work if CMake detects a real __cxa_thread_atexit_impl
+// at configure time. This function, however, was added only in glibc 2.18,
+// and there are still plenty of systems only using 2.17 (Ex RHEL 7).
+// XFAIL: libcxxabi-no-cxa-thread-atexit-impl
+
#include <assert.h>
#include <cxxabi.h>
Modified: libcxxabi/trunk/test/libcxxabi/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/libcxxabi/test/config.py?rev=296940&r1=296939&r2=296940&view=diff
==============================================================================
--- libcxxabi/trunk/test/libcxxabi/test/config.py (original)
+++ libcxxabi/trunk/test/libcxxabi/test/config.py Fri Mar 3 19:26:41 2017
@@ -45,6 +45,9 @@ class Configuration(LibcxxConfiguration)
# test_exception_storage_nodynmem.pass.cpp fails under this specific configuration
if self.get_lit_bool('cxx_ext_threads', False) and self.get_lit_bool('libcxxabi_shared', False):
self.config.available_features.add('libcxxabi-shared-externally-threaded')
+ if not self.get_lit_bool('has_cxa_thread_atexit_impl', True):
+ self.config.available_features.add(
+ 'libcxxabi-no-cxa-thread-atexit-impl')
def configure_compile_flags(self):
self.cxx.compile_flags += ['-DLIBCXXABI_NO_TIMER']
Modified: libcxxabi/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/lit.site.cfg.in?rev=296940&r1=296939&r2=296940&view=diff
==============================================================================
--- libcxxabi/trunk/test/lit.site.cfg.in (original)
+++ libcxxabi/trunk/test/lit.site.cfg.in Fri Mar 3 19:26:41 2017
@@ -20,6 +20,7 @@ config.host_triple = "@LLVM
config.target_triple = "@TARGET_TRIPLE@"
config.use_target = len("@LIBCXXABI_TARGET_TRIPLE@") > 0
config.cxx_ext_threads = "@LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY@"
+config.has_cxa_thread_atexit_impl = "@LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL@"
# Let the main config do the real work.
lit_config.load_config(config, "@LIBCXXABI_SOURCE_DIR@/test/lit.cfg")
More information about the cfe-commits
mailing list