Skip to content

Commit 04d5513

Browse files
dcaballetstellar
authored andcommitted
[mlir][cmake] Add missing MLIRTestDialect dependencies
This cherry picks [mlir] Fix build race condition in Pass Manager tests (d906da5) to the 20.x release branch. This addresses issues that started with llvm#123910, which is already on the 20.x branch. Linaro noticed this on our flang dylib (shared library) build bot. In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/test/lib/Pass/TestPassManager.cpp:10: /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/test/lib/Pass/../Dialect/Test/TestOps.h:148:10: fatal error: 'TestOps.h.inc' file not found 148 | #include "TestOps.h.inc" | ^~~~~~~~~~~~~~~ We have tested these changes on the buildbot for the last 2 days and had no problems. Whereas before it was failing maybe 1 in 10 builds, enough that multiple people in the community noticed it. Reported in llvm#124485.
1 parent 0d363c3 commit 04d5513

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mlir/test/lib/Pass/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ add_mlir_library(MLIRTestPass
1010

1111
ADDITIONAL_HEADER_DIRS
1212
${MLIR_MAIN_INCLUDE_DIR}/mlir/Pass
13+
14+
LINK_LIBS PUBLIC
15+
MLIRTestDialect
1316
)
1417
mlir_target_link_libraries(MLIRTestPass PUBLIC
1518
${conversion_libs}
1619
MLIRIR
1720
MLIRPass
18-
MLIRTestDialect
1921
)
2022

2123
target_include_directories(MLIRTestPass

0 commit comments

Comments
 (0)