[all-commits] [llvm/llvm-project] 07ca9c: Revert "[Support] Move getHostNumPhysicalCores to ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Nov 25 06:14:21 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 07ca9cc04bc2d57730507ad5ab444a1fd56cae11
      https://github.com/llvm/llvm-project/commit/07ca9cc04bc2d57730507ad5ab444a1fd56cae11
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-11-25 (Fri, 25 Nov 2022)

  Changed paths:
    M clang-tools-extra/clangd/test/Inputs/BenchmarkHeader.h
    M llvm/include/llvm/Support/Host.h
    M llvm/include/llvm/Support/Threading.h
    M llvm/lib/Support/Host.cpp
    M llvm/lib/Support/Threading.cpp
    M llvm/unittests/Support/Host.cpp
    M llvm/unittests/Support/Threading.cpp

  Log Message:
  -----------
  Revert "[Support] Move getHostNumPhysicalCores to Threading.h"

This reverts commit 5577207d6d3e0642ea047a8dfbfcf3ad372a7f25.

This breaks building LLVM on recent macOS. Error messages below:

llvm/lib/Support/Threading.cpp:190:3: error: use of undeclared
identifier 'sysctlbyname'
  sysctlbyname("hw.physicalcpu", &count, &len, NULL, 0);
    ^

llvm/lib/Support/Threading.cpp:193:13: error: use of undeclared
identifier 'CTL_HW'
    nm[0] = CTL_HW;
            ^

llvm/lib/Support/Threading.cpp:194:13: error: use of undeclared identifier 'HW_AVAILCPU'
    nm[1] = HW_AVAILCPU;
            ^

llvm/lib/Support/Threading.cpp:195:5: error: use of undeclared identifier 'sysctl'
    sysctl(nm, 2, &count, &len, NULL, 0);
    ^




More information about the All-commits mailing list