From: Tom Stellard Date: Mon, 6 May 2013 16:58:56 +0000 (-0700) Subject: gallivm: Fix build for LLVM < 3.3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=730c90a70ec47ad6e514b84295f8047fb986130a;p=mesa.git gallivm: Fix build for LLVM < 3.3 The C API versions of the LLVM multithreaded functions were added in LLVM 3.3. --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 897f7ffb276..1e5adb782b8 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -85,9 +85,15 @@ class LLVMEnsureMultithreaded { public: LLVMEnsureMultithreaded() { +#if HAVE_LLVM < 0x0303 + if (!llvm::llvm_is_multithreaded()) { + llvm::llvm_start_multithreaded(); + } +#else if (!LLVMIsMultithreaded()) { LLVMStartMultithreaded(); } +#endif } };