From 8305acb20062ffa37d1579d0063794432c01c26b Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 14 May 2013 13:29:16 +0000 Subject: Get the unittests compiling when building with cmake and the setting -DLLVM_ENABLE_THREADS=false. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181788 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Support/ManagedStatic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'unittests/Support') diff --git a/unittests/Support/ManagedStatic.cpp b/unittests/Support/ManagedStatic.cpp index 8ddad38ecf..1497f4e340 100644 --- a/unittests/Support/ManagedStatic.cpp +++ b/unittests/Support/ManagedStatic.cpp @@ -19,7 +19,8 @@ using namespace llvm; namespace { -#if defined(HAVE_PTHREAD_H) && !__has_feature(memory_sanitizer) +#if LLVM_ENABLE_THREADS != 0 && defined(HAVE_PTHREAD_H) && \ + !__has_feature(memory_sanitizer) namespace test1 { llvm::ManagedStatic ms; void *helper(void*) { -- cgit v1.2.3