[PATCH] D131565: [cmake] Fix tablegen exports

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 06:39:09 PDT 2022


nikic created this revision.
nikic added reviewers: ashay-github, rriddle.
Herald added subscribers: bzcheeseman, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, mehdi_amini, mgorny.
Herald added a project: All.
nikic requested review of this revision.
Herald added subscribers: llvm-commits, stephenneuendorffer, nicolasvasilache.
Herald added projects: MLIR, LLVM.

This fixes some fallout from D131282 <https://reviews.llvm.org/D131282>. Currently, add_tablegen() will add the tablegen target to LLVM_EXPORTS and associates the install with LLVMExport. 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.


https://reviews.llvm.org/D131565

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131565.451438.patch
Type: text/x-patch
Size: 3750 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220810/44ed83cc/attachment.bin>


More information about the llvm-commits mailing list