[PATCH] D18205: [libcxxabi] Disable cxa_thread_atexit_test if unavailable

Jonas Hahnfeld via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 16 02:24:11 PDT 2016


Hahnfeld created this revision.
Hahnfeld added reviewers: EricWF, danalbert.
Hahnfeld added a subscriber: cfe-commits.

The feature check is already in place when building the library but wasn't honored for the tests.

http://reviews.llvm.org/D18205

Files:
  test/CMakeLists.txt
  test/cxa_thread_atexit_test.pass.cpp
  test/libcxxabi/test/config.py
  test/lit.site.cfg.in

Index: test/lit.site.cfg.in
===================================================================
--- test/lit.site.cfg.in
+++ test/lit.site.cfg.in
@@ -13,6 +13,7 @@
 config.enable_32bit             = "@LLVM_BUILD_32_BITS@"
 config.target_info              = "@LIBCXXABI_TARGET_INFO@"
 config.executor                 = "@LIBCXXABI_EXECUTOR@"
+config.thread_atexit            = "@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")
Index: test/libcxxabi/test/config.py
===================================================================
--- test/libcxxabi/test/config.py
+++ test/libcxxabi/test/config.py
@@ -33,6 +33,11 @@
         self.libcxxabi_obj_root = self.get_lit_conf('libcxxabi_obj_root')
         super(Configuration, self).configure_obj_root()
 
+    def configure_features(self):
+        super(Configuration, self).configure_features()
+        if self.get_lit_bool('thread_atexit', False):
+            self.config.available_features.add('thread_atexit')
+
     def configure_compile_flags(self):
         self.cxx.compile_flags += ['-DLIBCXXABI_NO_TIMER']
         self.cxx.compile_flags += ['-funwind-tables']
Index: test/cxa_thread_atexit_test.pass.cpp
===================================================================
--- test/cxa_thread_atexit_test.pass.cpp
+++ test/cxa_thread_atexit_test.pass.cpp
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: linux
+// REQUIRES: thread_atexit
 
 #include <assert.h>
 #include <cxxabi.h>
Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -10,6 +10,7 @@
 pythonize_bool(LIBCXXABI_ENABLE_SHARED)
 pythonize_bool(LIBCXXABI_ENABLE_THREADS)
 pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
+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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18205.50805.patch
Type: text/x-patch
Size: 2133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160316/1973c11c/attachment.bin>


More information about the cfe-commits mailing list