cpuinfo icon indicating copy to clipboard operation
cpuinfo copied to clipboard

Support ARM64EC vcpkg build

Open edgchen1 opened this issue 4 months ago • 0 comments

  1. Use CMAKE_C_COMPILER_ARCHITECTURE_ID to determine target processor when compiler is MSVC. The existing logic only handles the VS generator. Added a case to support other generators like Ninja.

  2. Replace existing usages of CMAKE_SYSTEM_PROCESSOR with CPUINFO_TARGET_PROCESSOR. One of these was required in order to build for ARM64EC with vcpkg (where it was hitting this warning).

https://github.com/pytorch/cpuinfo/blob/8a9210069b5a37dd89ed118a783945502a30a4ae/CMakeLists.txt#L91-L97

Context: CMAKE_SYSTEM_PROCESSOR is known to have issues on Windows. See this issue. This comment suggests using CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID.

edgchen1 avatar Aug 27 '25 00:08 edgchen1