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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Jul 4 00:58:26 PDT 2025


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

>From 4ab2b9acc1f02f2fb3536f3186c2b82ff7c28d31 Mon Sep 17 00:00:00 2001
From: Arthurq Qiu <arthurq at nvidia.com>
Date: Wed, 25 Jun 2025 03:51:15 -0700
Subject: [PATCH] [MLIR][IRDL][CMake] CMake fixes for cross-compilation

---
 mlir/cmake/modules/IRDLToCpp.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/cmake/modules/IRDLToCpp.cmake b/mlir/cmake/modules/IRDLToCpp.cmake
index 8470ccdf55166..3fa1601c694d2 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} ${MLIR_IRDL_TO_CPP_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/${irdl_file}
     COMMENT "Building ${irdl_file}..."
   )
   add_custom_target(${target} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${irdl_file}.cpp.inc)



More information about the Mlir-commits mailing list