[all-commits] [llvm/llvm-project] c84ad7: [CMake] Improve GetHostTriple for Windows/ARM conf...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Mon Aug 9 01:32:23 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c84ad73a27da69975f9d4c44cae843b30e35542d
      https://github.com/llvm/llvm-project/commit/c84ad73a27da69975f9d4c44cae843b30e35542d
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-08-09 (Mon, 09 Aug 2021)

  Changed paths:
    M llvm/cmake/modules/GetHostTriple.cmake

  Log Message:
  -----------
  [CMake] Improve GetHostTriple for Windows/ARM configurations

In MSVC mode, CMake provides CMAKE_C_COMPILER_ARCHITECTURE_ID,
which should be accurate for what the compiler produces. Keep
the old CMAKE_C_SIZEOF_VOID_P based fallback in case this
doesn't provide matches.

In GCC/MinGW mode, CMake doesn't provide that. As we're trying to
guess the default host architecture, use CMAKE_HOST_SYSTEM_PROCESSOR
in combination with the existing CMAKE_C_SIZEOF_VOID_P check to
estimate whether it's x86/x86_64/arm/aarch64.

Differential Revision: https://reviews.llvm.org/D107626




More information about the All-commits mailing list