mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 23:49:22 +08:00
[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
This commit is contained in:
@@ -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 <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user