[all-commits] [llvm/llvm-project] 8f555a: [cmake] Fix tablegen exports

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Aug 16 05:17:53 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8f555a52e033ceec4c4508eb800c9a186acec87f
      https://github.com/llvm/llvm-project/commit/8f555a52e033ceec4c4508eb800c9a186acec87f
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-08-16 (Tue, 16 Aug 2022)

  Changed paths:
    M clang/utils/TableGen/CMakeLists.txt
    M llvm/cmake/modules/TableGen.cmake
    M llvm/utils/TableGen/CMakeLists.txt
    M mlir/tools/mlir-pdll/CMakeLists.txt
    M mlir/tools/mlir-tblgen/CMakeLists.txt

  Log Message:
  -----------
  [cmake] Fix tablegen exports

This fixes some fallout from D131282. Currently, add_tablegen() will add the tablegen target to LLVM_EXPORTS and associates the install with LLVMExports. For non-standalone builds, this means that you end up with mlir-tblgen and clang-tblgen in LLVMExports.

However, these projects should instead be using MLIR_EXPORTS/MLIRTargets and CLANG_EXPORTS/ClangTargets. To fix this, add an extra EXPORT option and make use of get_target_export_arg() to create the correct export argument.

Reviewed By: ashay-github

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




More information about the All-commits mailing list