[llvm-branch-commits] [mlir] 04d5513 - [mlir][cmake] Add missing MLIRTestDialect dependencies

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Feb 10 13:26:13 PST 2025


Author: Diego Caballero
Date: 2025-02-10T13:25:08-08:00
New Revision: 04d55131ce724ad4a8ca2686ee54df83484f94e9

URL: https://github.com/llvm/llvm-project/commit/04d55131ce724ad4a8ca2686ee54df83484f94e9
DIFF: https://github.com/llvm/llvm-project/commit/04d55131ce724ad4a8ca2686ee54df83484f94e9.diff

LOG: [mlir][cmake] Add missing MLIRTestDialect dependencies

This cherry picks
[mlir] Fix build race condition in Pass Manager tests (d906da5ead2764579395e5006c517f2ec9afd46f)
to the 20.x release branch.

This addresses issues that started with
https://github.com/llvm/llvm-project/pull/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 https://github.com/llvm/llvm-project/issues/124485.

Added: 
    

Modified: 
    mlir/test/lib/Pass/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/test/lib/Pass/CMakeLists.txt b/mlir/test/lib/Pass/CMakeLists.txt
index 6698af86b8ae66d..c5d0bab8ec74946 100644
--- a/mlir/test/lib/Pass/CMakeLists.txt
+++ b/mlir/test/lib/Pass/CMakeLists.txt
@@ -10,12 +10,14 @@ add_mlir_library(MLIRTestPass
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Pass
+
+  LINK_LIBS PUBLIC
+  MLIRTestDialect
   )
 mlir_target_link_libraries(MLIRTestPass PUBLIC
   ${conversion_libs}
   MLIRIR
   MLIRPass
-  MLIRTestDialect
   )
 
 target_include_directories(MLIRTestPass


        


More information about the llvm-branch-commits mailing list