[Mlir-commits] [mlir] [MLIR] Install missing standalone helper tools (PR #205066)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jun 22 02:05:54 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Momchil Velikov (momchil-velikov)
<details>
<summary>Changes</summary>
Standalone MLIR installs CMake package files that can reference helper executables needed by downstream builds. Most helper tools already have install paths available through existing LLVM tool and utility install options, but `mlir-src-sharder` does not pass an install destination to `add_tablegen` and `mlir-irdl-to-cpp` does not define an install rule.
Install those two missing helpers.
Co-authored-by: Luca Fancellu <luca.fancellu@<!-- -->arm.com>
---
Full diff: https://github.com/llvm/llvm-project/pull/205066.diff
2 Files Affected:
- (modified) mlir/tools/mlir-irdl-to-cpp/CMakeLists.txt (+11)
- (modified) mlir/tools/mlir-src-sharder/CMakeLists.txt (+2)
``````````diff
diff --git a/mlir/tools/mlir-irdl-to-cpp/CMakeLists.txt b/mlir/tools/mlir-irdl-to-cpp/CMakeLists.txt
index 27a7e22db7d7b..5b69b364c6b32 100644
--- a/mlir/tools/mlir-irdl-to-cpp/CMakeLists.txt
+++ b/mlir/tools/mlir-irdl-to-cpp/CMakeLists.txt
@@ -7,3 +7,14 @@ mlir_target_link_libraries(mlir-irdl-to-cpp
)
setup_host_tool(mlir-irdl-to-cpp MLIR_IRDL_TO_CPP MLIR_IRDL_TO_CPP_EXE MLIR_IRDL_TO_CPP_TARGET)
+
+if(NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ install(TARGETS mlir-irdl-to-cpp
+ RUNTIME DESTINATION "${MLIR_TOOLS_INSTALL_DIR}"
+ COMPONENT mlir-irdl-to-cpp)
+ if(NOT LLVM_ENABLE_IDE)
+ add_llvm_install_targets(install-mlir-irdl-to-cpp
+ DEPENDS mlir-irdl-to-cpp
+ COMPONENT mlir-irdl-to-cpp)
+ endif()
+endif()
diff --git a/mlir/tools/mlir-src-sharder/CMakeLists.txt b/mlir/tools/mlir-src-sharder/CMakeLists.txt
index bc4a11bd4c0cb..b5d90cfe238ed 100644
--- a/mlir/tools/mlir-src-sharder/CMakeLists.txt
+++ b/mlir/tools/mlir-src-sharder/CMakeLists.txt
@@ -2,6 +2,8 @@ set(LLVM_LINK_COMPONENTS Support)
set(LIBS MLIRSupport)
add_tablegen(mlir-src-sharder MLIR_SRC_SHARDER
+ DESTINATION "${MLIR_TOOLS_INSTALL_DIR}"
+ EXPORT MLIR
mlir-src-sharder.cpp)
set_target_properties(mlir-src-sharder PROPERTIES FOLDER "MLIR/Tablegenning")
``````````
</details>
https://github.com/llvm/llvm-project/pull/205066
More information about the Mlir-commits
mailing list