From e23dce6c974477d3476bee5256a83a9aaea8eae4 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Wed, 14 Jul 2021 13:29:15 -0700 Subject: [PATCH] [Support] Get correct number of physical cores on Apple Silicon Fix a bug that `computeHostNumPhysicalCores` is fallback to default unknown when building for Apple Silicon macs. rdar://80533675 Reviewed By: arphaman Differential Revision: https://reviews.llvm.org/D106012 --- llvm/lib/Support/Host.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 478351769705..1ecfef95fdff 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -1404,7 +1404,7 @@ int computeHostNumPhysicalCores() { } #elif defined(__linux__) && defined(__s390x__) int computeHostNumPhysicalCores() { return sysconf(_SC_NPROCESSORS_ONLN); } -#elif defined(__APPLE__) && defined(__x86_64__) +#elif defined(__APPLE__) #include #include