summaryrefslogtreecommitdiffstats
path: root/libcxxabi/test/test_exception_storage.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2014-11-24 22:42:03 +0000
committerEric Fiselier <eric@efcs.ca>2014-11-24 22:42:03 +0000
commit559f867af23c4bf53df1fdd2294450b86fb88c8e (patch)
tree97fd1d2a1b32c0fbb1350d868f805b6e1731ca12 /libcxxabi/test/test_exception_storage.cpp
parentc5de7b113b53a72ea02ea269d81151e8b3c3f9df (diff)
downloadbcm5719-llvm-559f867af23c4bf53df1fdd2294450b86fb88c8e.tar.gz
bcm5719-llvm-559f867af23c4bf53df1fdd2294450b86fb88c8e.zip
[libcxxabi] Refactor building and testing libc++abi without threads
Summary: This patch adds CMake support for building and testing libc++abi without threads. 1. Add `LIBCXXABI_ENABLE_THREADS` option to CMake. 2. Propagate `LIBCXXABI_ENABLE_THREADS` to lit via lit.site.cfg.in 3. Configure tests for `LIBCXXABI_ENABLE_THREADS=OFF Currently the test suite does not work when libc++abi is built without threads because that information does not propagate to the test suite. Reviewers: danalbert, mclow.lists, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6393 llvm-svn: 222702
Diffstat (limited to 'libcxxabi/test/test_exception_storage.cpp')
-rw-r--r--libcxxabi/test/test_exception_storage.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libcxxabi/test/test_exception_storage.cpp b/libcxxabi/test/test_exception_storage.cpp
index f1e2fb5e477..0d5deaa3735 100644
--- a/libcxxabi/test/test_exception_storage.cpp
+++ b/libcxxabi/test/test_exception_storage.cpp
@@ -56,7 +56,10 @@ int main ( int argc, char *argv [] ) {
#if LIBCXXABI_HAS_NO_THREADS
size_t thread_globals;
- retVal = thread_code(&thread_globals) != 0;
+ // Check that __cxa_get_globals() is not NULL.
+ if (thread_code(&thread_globals) == 0) {
+ retVal = 1;
+ }
#else
// Make the threads, let them run, and wait for them to finish
for ( int i = 0; i < NUMTHREADS; ++i )
OpenPOWER on IntegriCloud