Skip to content

Commit c4e395e

Browse files
[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
1 parent 6bb0ec8 commit c4e395e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Support/Host.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ int computeHostNumPhysicalCores() {
13091309
}
13101310
#elif defined(__linux__) && defined(__s390x__)
13111311
int computeHostNumPhysicalCores() { return sysconf(_SC_NPROCESSORS_ONLN); }
1312-
#elif defined(__APPLE__) && defined(__x86_64__)
1312+
#elif defined(__APPLE__)
13131313
#include <sys/param.h>
13141314
#include <sys/sysctl.h>
13151315

0 commit comments

Comments
 (0)