From 718ec394030ca2da3973e0135d073e000b366848 Mon Sep 17 00:00:00 2001 Date: Sun, 16 May 2021 12:22:44 -0700 Subject: [PATCH 08/24] Threading: Only call setpriority(PRIO_DARWIN_THREAD, 0, PRIO_DARWIN_BG) if it is available --- llvm/lib/Support/Unix/Threading.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Support/Unix/Threading.inc b/llvm/lib/Support/Unix/Threading.inc index 99f64b4f553d..ea40db932fc1 100644 --- a/llvm/lib/Support/Unix/Threading.inc +++ b/llvm/lib/Support/Unix/Threading.inc @@ -264,7 +264,7 @@ SetThreadPriorityResult llvm::set_thread_priority(ThreadPriority Priority) { &priority) ? SetThreadPriorityResult::SUCCESS : SetThreadPriorityResult::FAILURE; -#elif defined(__APPLE__) +#elif defined(__APPLE__) && defined(PRIO_DARWIN_THREAD) && defined(PRIO_DARWIN_BG) // https://developer.apple.com/documentation/apple-silicon/tuning-your-code-s-performance-for-apple-silicon // // Background - Applies to work that isn’t visible to the user and may take significant