[all-commits] [llvm/llvm-project] 1dbb7a: [CMake] Fix cross-compiling with LLVM as CMake sub...

Seebi via All-commits all-commits at lists.llvm.org
Thu Apr 30 07:55:27 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1dbb7a3518bb7e82403d57238273283310d9e9e1
      https://github.com/llvm/llvm-project/commit/1dbb7a3518bb7e82403d57238273283310d9e9e1
  Author: Sebastian Neubauer <sebastian.neubauer at amd.com>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

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

  Log Message:
  -----------
  [CMake] Fix cross-compiling with LLVM as CMake subproject

When embedding LLVM as a CMake subproject, using cross-compiling does
not work at the moment. This also affects -DLLVM_OPTIMIZED_TABLEGEN=1,
which uses the same CMake infrastructure.

This patch replaces global CMake variables with the current version,
which allows cross-compilation to work in a subproject.

CMAKE_BINARY_DIR -> CMAKE_CURRENT_BINARY_DIR
CMAKE_SOURCE_DIR -> CMAKE_CURRENT_SOURCE_DIR
CMAKE_PROJECT_NAME -> PROJECT_NAME

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




More information about the All-commits mailing list