[LLVMdev] Build failure when building single threaded LLVM with CMake

Óscar Fuentes ofv at wanadoo.es
Mon Jan 7 16:46:12 PST 2013


Manish Verma <manish.avtaar at gmail.com> writes:

> I am attaching a patch which fixes the above mentioned failures. Could you
> please review the patch?

[snip]

> index 79eb098..6419653 100644
> --- a/unittests/Support/ManagedStatic.cpp
> +++ b/unittests/Support/ManagedStatic.cpp
> @@ -9,7 +9,7 @@
>  #include "llvm/Support/ManagedStatic.h"
>  #include "llvm/Config/config.h"
>  #include "llvm/Support/Threading.h"
> -#ifdef HAVE_PTHREAD_H
> +#ifdef LLVM_ENABLE_THREADS !=0 && defined(HAVE_PTHREAD_H)

Use #if instead of #ifdef

>  #include <pthread.h>
>  #endif
>  
> @@ -19,7 +19,7 @@ using namespace llvm;
>  
>  namespace {
>  
> -#ifdef HAVE_PTHREAD_H
> +#ifdef LLVM_ENABLE_PTHREADS!=0 && defined(HAVE_PTHREAD_H)

Same here.

[snip]




More information about the llvm-dev mailing list