[all-commits] [llvm/llvm-project] cd0580: [CMake] Fix runtimes build for host Windows (defau...

chbessonova via All-commits all-commits at lists.llvm.org
Sat Jun 20 01:46:02 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cd058033b9004a028bf454585814b4b5ee4d9602
      https://github.com/llvm/llvm-project/commit/cd058033b9004a028bf454585814b4b5ee4d9602
  Author: Kristina Bessonova <kbessonova at accesssoftek.com>
  Date:   2020-06-20 (Sat, 20 Jun 2020)

  Changed paths:
    M llvm/runtimes/CMakeLists.txt

  Log Message:
  -----------
  [CMake] Fix runtimes build for host Windows (default target)

When building runtimes, the compiler name (e.g. clang, clang-cl) is set based on
`CMAKE_SYSTEM_NAME` passed to `llvm_ExternalProject_Add()` through `CMAKE_ARGS` argument.
This mechanism doesn't work well if the target is Windows host.
`runtime_default_target()`/`builtin_default_target()` doesn't provide a way
to specify `CMAKE_SYSTEM_NAME` and doesn't set it either.

This patch appends variables specified in `RUNTIMES_CMAKE_ARGS`/`BUILTINS_CMAKE_ARGS`
to `CMAKE_ARGS` argument of `llvm_ExternalProject_Add()` in the case of called
from `runtime_default_target()`/`builtin_default_target()` thus in particular
it allows passing CMAKE_SYSTEM_NAME whenever it is required.

Reviewed By: phosek, compnerd, plotfi

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




More information about the All-commits mailing list