From: Nico Weber Date: Sun, 21 Apr 2019 19:18:41 +0000 (+0000) Subject: Attempt to fix LLVM_ENABLE_THREADS=OFF build after r358665 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e513c06257d0348300660beabc6782f34579896;p=clang Attempt to fix LLVM_ENABLE_THREADS=OFF build after r358665 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358858 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 07aeb50695..46e6340d66 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -8723,7 +8723,9 @@ void clang::setThreadBackgroundPriority() { if (getenv("LIBCLANG_BGPRIO_DISABLE")) return; +#if LLVM_ENABLE_THREADS llvm::set_thread_priority(llvm::ThreadPriority::Background); +#endif } void cxindex::printDiagsToStderr(ASTUnit *Unit) {