aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarthurqiu <arthurq@nvidia.com>2025-07-04 19:04:33 +0800
committerGitHub <noreply@github.com>2025-07-04 13:04:33 +0200
commit03cfba484fffe97becaeee5a42bf2d0d84a9555c (patch)
tree9b061f16edfcdd06d7c226335180ade9707f7a34
parent043789519a118035534c66bacf0ed4b188b2d1a2 (diff)
downloadllvm-03cfba484fffe97becaeee5a42bf2d0d84a9555c.zip
llvm-03cfba484fffe97becaeee5a42bf2d0d84a9555c.tar.gz
llvm-03cfba484fffe97becaeee5a42bf2d0d84a9555c.tar.bz2
[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.
-rw-r--r--mlir/cmake/modules/IRDLToCpp.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/cmake/modules/IRDLToCpp.cmake b/mlir/cmake/modules/IRDLToCpp.cmake
index 8470ccd..3fa1601 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)