[all-commits] [llvm/llvm-project] a7cad6: [PR48898][CMake] Support MinGW Toolchain tool sin ...

zero9178 via All-commits all-commits at lists.llvm.org
Tue Mar 2 13:45:28 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a7cad6680b4087eff8994f1f99ac40c661a6621f
      https://github.com/llvm/llvm-project/commit/a7cad6680b4087eff8994f1f99ac40c661a6621f
  Author: Markus Böck <markus.boeck02 at gmail.com>
  Date:   2021-03-02 (Tue, 02 Mar 2021)

  Changed paths:
    M llvm/cmake/modules/LLVMExternalProjectUtils.cmake
    M llvm/runtimes/CMakeLists.txt

  Log Message:
  -----------
  [PR48898][CMake] Support MinGW Toolchain tool sin llvm_ExternalProject_Add

Windows is in the unique position of having two drivers, clang-cl and normal GNU clang, depending on whether a GNU or MSVC target is used. The current implementation with the USE_TOOLCHAIN argument assumes that when CMAKE_SYSTEM_NAME is set to Windows that clang-cl should be used, which is the incorrect choice when targeting a GNU environment.

This patch solves this problem by adding an optional TARGET_TRIPLE argument to llvm_ExternalProject_Add, which sets the various CMAKE_<LANG>_COMPILER_TARGET variables. Additionally, if the triple is detected as an MSVC environment, clang-cl and similar MSVC specific tools will be used instead of the GNU tools.




More information about the All-commits mailing list