[Mlir-commits] [mlir] [mlir][CMake] Fix another dependency on MLIRTestDialect in Transforms tests (PR #125894)

David Spickett llvmlistbot at llvm.org
Wed Feb 5 09:49:22 PST 2025


https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/125894

Another follow up fix to https://github.com/llvm/llvm-project/pull/123910 to fix a build failure that sometimes happens in shared library builds: https://lab.llvm.org/buildbot/#/builders/50/builds/9724

In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/test/lib/Transforms/TestInlining.cpp:16: /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/test/lib/Transforms/../Dialect/Test/TestOps.h:148:10: fatal error: 'TestOps.h.inc' file not found
  148 | #include "TestOps.h.inc"
      |          ^~~~~~~~~~~~~~~
1 error generated.

>From 97e1d082aa8582ab47a5d39fe369e7c574bbb9ad Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Wed, 5 Feb 2025 17:39:27 +0000
Subject: [PATCH] [mlir][CMake] Fix another dependency on MLIRTestDialect in
 Transforms tests

Another follow up fix to https://github.com/llvm/llvm-project/pull/123910
to fix a build failure that sometimes happens in shared library builds:
https://lab.llvm.org/buildbot/#/builders/50/builds/9724

In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/test/lib/Transforms/TestInlining.cpp:16:
/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/test/lib/Transforms/../Dialect/Test/TestOps.h:148:10: fatal error: 'TestOps.h.inc' file not found
  148 | #include "TestOps.h.inc"
      |          ^~~~~~~~~~~~~~~
1 error generated.
---
 mlir/test/lib/Transforms/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mlir/test/lib/Transforms/CMakeLists.txt b/mlir/test/lib/Transforms/CMakeLists.txt
index b91265d20fb481..1b9b9bffa52792 100644
--- a/mlir/test/lib/Transforms/CMakeLists.txt
+++ b/mlir/test/lib/Transforms/CMakeLists.txt
@@ -34,12 +34,14 @@ add_mlir_library(MLIRTestTransforms
 
   DEPENDS
   ${MLIRTestTransformsPDLDep}
+
+  LINK_LIBS PUBLIC
+  MLIRTestDialect
   )
 mlir_target_link_libraries(MLIRTestTransforms PUBLIC
   MLIRAnalysis
   MLIRFuncDialect
   MLIRInferIntRangeInterface
-  MLIRTestDialect
   MLIRTransforms
   )
 



More information about the Mlir-commits mailing list