[Mlir-commits] [mlir] [MLIR][IRDL][CMake] CMake fixes for cross-compilation (PR #145672)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jun 25 04:02:34 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: None (arthurqiu)

<details>
<summary>Changes</summary>

The PR fixes a misconfigured dependency that causes CMake error "No rule to make target 'NATIVE/bin/mlir-irdl-to-cpp'" for cross-compilation.

---
Full diff: https://github.com/llvm/llvm-project/pull/145672.diff


1 Files Affected:

- (modified) mlir/cmake/modules/IRDLToCpp.cmake (+1-1) 


``````````diff
diff --git a/mlir/cmake/modules/IRDLToCpp.cmake b/mlir/cmake/modules/IRDLToCpp.cmake
index 8470ccdf55166..2457773ef2565 100644
--- a/mlir/cmake/modules/IRDLToCpp.cmake
+++ b/mlir/cmake/modules/IRDLToCpp.cmake
@@ -5,7 +5,7 @@ function(add_irdl_to_cpp_target target irdl_file)
 
     # The command output depends on the executable to ensure IRDL sources are properly rebuilt
     # if the tool changes.
-    DEPENDS ${MLIR_IRDL_TO_CPP_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/${irdl_file}
+    DEPENDS ${MLIR_IRDL_TO_CPP_TARGET} ${CMAKE_CURRENT_SOURCE_DIR}/${irdl_file}
     COMMENT "Building ${irdl_file}..."
   )
   add_custom_target(${target} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${irdl_file}.cpp.inc)

``````````

</details>


https://github.com/llvm/llvm-project/pull/145672


More information about the Mlir-commits mailing list