[all-commits] [llvm/llvm-project] 31880d: [OpenMP] get logical core count on modern apple pl...

nihui via All-commits all-commits at lists.llvm.org
Tue Apr 2 08:39:01 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 31880df9947d58c160b691160c4714277be7c31e
      https://github.com/llvm/llvm-project/commit/31880df9947d58c160b691160c4714277be7c31e
  Author: nihui <shuizhuyuanluo at 126.com>
  Date:   2024-04-02 (Tue, 02 Apr 2024)

  Changed paths:
    M openmp/runtime/src/z_Linux_util.cpp

  Log Message:
  -----------
  [OpenMP] get logical core count on modern apple platform (#87231)

`hw.logicalcpu` returns the available logical core count

Fix build error for watchOS

```
runtime/src/z_Linux_util.cpp:1821:8: error: 'host_info' is unavailable: not available on watchOS
  rc = host_info(mach_host_self(), HOST_BASIC_INFO, (host_info_t)&info, &num);
       ^
/Applications/Xcode_15.2.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS10.2.sdk/usr/include/mach/mach_host.h:82:15: note: 'host_info' has been explicitly marked unavailable here
kern_return_t host_info
              ^
1 warning and 1 error generated.
make[2]: *** [runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o] Error 1
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list