Skip to content

Conversation

@nikic
Copy link
Contributor

@nikic nikic commented Feb 4, 2025

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.

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 llvm#123910 and follows up on the
fix in llvm#125004, which added the library to DEPENDS, which is not
sufficient.
@nikic nikic requested a review from mgorny February 4, 2025 15:39
@llvmbot llvmbot added the mlir label Feb 4, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 4, 2025

@llvm/pr-subscribers-mlir

Author: Nikita Popov (nikic)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/125705.diff

1 Files Affected:

  • (modified) mlir/test/lib/IR/CMakeLists.txt (+1-2)
diff --git a/mlir/test/lib/IR/CMakeLists.txt b/mlir/test/lib/IR/CMakeLists.txt
index eeb9cf1e34fc8c0..1abcfc77d2d9b04 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

Copy link
Member

@mgorny mgorny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and again, sorry for the mistake.

@nikic nikic merged commit ad152f4 into llvm:main Feb 5, 2025
10 checks passed
@nikic nikic deleted the mlir-dep-fix branch February 5, 2025 09:09
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
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 llvm#123910 and follows up on the fix in
llvm#125004, which added the library to DEPENDS, which is not sufficient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants