[all-commits] [llvm/llvm-project] e9be21: [CMake] Handle clang in MSVC mode in GetHostTriple...

Daniel Kiss via All-commits all-commits at lists.llvm.org
Fri Nov 29 01:31:54 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9be21786c972de93206599d4e06b79c2ca8f772
      https://github.com/llvm/llvm-project/commit/e9be21786c972de93206599d4e06b79c2ca8f772
  Author: Daniel Kiss <daniel.kiss at arm.com>
  Date:   2024-11-29 (Fri, 29 Nov 2024)

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

  Log Message:
  -----------
  [CMake] Handle clang in MSVC mode in GetHostTriple (#116701)

When configuring CMake with Clang in MSVC mode, Clang can either be
invoked with the MSVC style driver (clang-cl) or the GNU style driver
(clang). When using the MSVC style driver, CMake sets the CMake variable
MSVC (which indicates the kind of command line interface), but when
using the GNU style driver, this variable isn't set, while Clang still
operates in MSVC mode.

Even though CMake doesn't set the variable MSVC, it still does set
CMAKE_C_COMPILER_ARCHITECTURE_ID, which it does set for MSVC and Clang
in MSVC mode, but not for Clang in MinGW mode.

For this configuration, use the MSVC style,
CMAKE_C_COMPILER_ARCHITECTURE_ID based GetHostTriple implementation.



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