[PATCH] D141092: Optionally install clang-tblgen to aid cross-compiling

James Le Cuirot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 5 14:54:38 PST 2023


chewi created this revision.
chewi added a reviewer: MaskRay.
chewi added a project: clang.
Herald added a subscriber: StephenFan.
Herald added a project: All.
chewi requested review of this revision.
Herald added a subscriber: cfe-commits.

clang-tblgen is required to cross-compile clang itself. This change respects LLVM_DISTRIBUTION_COMPONENTS.

Closes: https://github.com/llvm/llvm-project/issues/20282


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141092

Files:
  clang/utils/TableGen/CMakeLists.txt


Index: clang/utils/TableGen/CMakeLists.txt
===================================================================
--- clang/utils/TableGen/CMakeLists.txt
+++ clang/utils/TableGen/CMakeLists.txt
@@ -28,3 +28,13 @@
 target_link_libraries(clang-tblgen PRIVATE clangSupport_tablegen)
 
 set_target_properties(clang-tblgen PROPERTIES FOLDER "Clang tablegenning")
+
+install(TARGETS clang-tblgen
+        COMPONENT clang-tblgen
+        RUNTIME DESTINATION "${CLANG_TOOLS_INSTALL_DIR}")
+
+if(NOT LLVM_ENABLE_IDE)
+  add_llvm_install_targets("install-clang-tblgen"
+                           DEPENDS clang-tblgen
+                           COMPONENT clang-tblgen)
+endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141092.486687.patch
Type: text/x-patch
Size: 666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230105/4ff3e213/attachment.bin>


More information about the cfe-commits mailing list