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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Jul 4 04:04:36 PDT 2025


Author: arthurqiu
Date: 2025-07-04T13:04:33+02:00
New Revision: 03cfba484fffe97becaeee5a42bf2d0d84a9555c

URL: https://github.com/llvm/llvm-project/commit/03cfba484fffe97becaeee5a42bf2d0d84a9555c
DIFF: https://github.com/llvm/llvm-project/commit/03cfba484fffe97becaeee5a42bf2d0d84a9555c.diff

LOG: [MLIR][IRDL][CMake] CMake fixes for cross-compilation (#145672)

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

Added: 
    

Modified: 
    mlir/cmake/modules/IRDLToCpp.cmake

Removed: 
    


################################################################################
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