[PATCH] D72045: Add missing mlir-headers target and add tablegen'd deps to it.

Stella Laurenzo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 31 16:40:11 PST 2019


stellaraccident created this revision.
Herald added subscribers: llvm-commits, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini, mgorny.
Herald added a project: LLVM.
stellaraccident added a reviewer: jpienaar.

Prior to this, "ninja install-mlir-headers" failed with an error indicating
the missing target. Verified that from a clean build, the installed
headers include generated files.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72045

Files:
  mlir/CMakeLists.txt


Index: mlir/CMakeLists.txt
===================================================================
--- mlir/CMakeLists.txt
+++ mlir/CMakeLists.txt
@@ -17,6 +17,7 @@
   mlir_tablegen(${dialect}.h.inc -gen-op-decls)
   mlir_tablegen(${dialect}.cpp.inc -gen-op-defs)
   add_public_tablegen_target(MLIR${dialect}IncGen)
+  add_dependencies(mlir-headers MLIR${dialect}IncGen)
 
   # Generate Dialect Documentation
   set(LLVM_TARGET_DEFINITIONS ${dialect_doc_filename}.td)
@@ -32,6 +33,10 @@
   add_dependencies(mlir-doc ${dialect_doc_filename}DocGen)
 endfunction()
 
+# Installing the headers and docs needs to depend on generating any public
+# tablegen'd targets.
+add_custom_target(mlir-headers)
+set_target_properties(mlir-headers PROPERTIES FOLDER "Misc")
 add_custom_target(mlir-doc)
 
 # TODO: This is to handle the current static registration, but should be


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72045.235740.patch
Type: text/x-patch
Size: 859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200101/3a313b3d/attachment.bin>


More information about the llvm-commits mailing list