diff options
-rw-r--r-- | tools/libclang/CIndex.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 23d0768413..f3c91e31b4 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -6137,6 +6137,9 @@ void SetSafetyThreadStackSize(unsigned Value) { } void clang::setThreadBackgroundPriority() { + if (getenv("LIBCLANG_BGPRIO_DISABLE")) + return; + // FIXME: Move to llvm/Support and make it cross-platform. #ifdef __APPLE__ setpriority(PRIO_DARWIN_THREAD, 0, PRIO_DARWIN_BG); |