[Mlir-commits] [mlir] [mlir] Fix MLIRTestDialect dependency in MLIRTestIR (PR #125705)
Nikita Popov
llvmlistbot at llvm.org
Tue Feb 4 07:39:56 PST 2025
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/125705
This is a test library which is not part of libMLIR, so it should use normal LINK_LIBS instead of mlir_target_link_libraries.
This fixes an issue introduced in #123910 and follows up on the fix in #125004, which added the library to DEPENDS, which is not sufficient.
>From b1005972561dfc66d04395569daee5d7e9dbf3e1 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Tue, 4 Feb 2025 16:37:21 +0100
Subject: [PATCH] [mlir] Fix MLIRTestDialect dependency in MLIRTestIR
This is a test library which is not part of libMLIR, so it should
use normal LINK_LIBS instead of mlir_target_link_libraries.
This fixes an issue introduced in #123910 and follows up on the
fix in #125004, which added the library to DEPENDS, which is not
sufficient.
---
mlir/test/lib/IR/CMakeLists.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mlir/test/lib/IR/CMakeLists.txt b/mlir/test/lib/IR/CMakeLists.txt
index eeb9cf1e34fc8c..1abcfc77d2d9b0 100644
--- a/mlir/test/lib/IR/CMakeLists.txt
+++ b/mlir/test/lib/IR/CMakeLists.txt
@@ -28,7 +28,7 @@ add_mlir_library(MLIRTestIR
EXCLUDE_FROM_LIBMLIR
- DEPENDS
+ LINK_LIBS PUBLIC
MLIRTestDialect
)
@@ -37,7 +37,6 @@ mlir_target_link_libraries(MLIRTestIR PUBLIC
MLIRBytecodeReader
MLIRBytecodeWriter
MLIRFunctionInterfaces
- MLIRTestDialect
)
target_include_directories(MLIRTestIR
More information about the Mlir-commits
mailing list