[Mlir-commits] [mlir] b8c260c - Remove linking all targets from `mlir-opt` (NFC)

Mehdi Amini llvmlistbot at llvm.org
Wed Apr 1 10:31:27 PDT 2020


Author: Mehdi Amini
Date: 2020-04-01T17:21:07Z
New Revision: b8c260c38d0ae93f8ae037fc1e9b94695b06d7ec

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

LOG: Remove linking all targets from `mlir-opt` (NFC)

There is no need to directly depends on this from mlir-opt, some library
may transitively depend on a subset of the targets when enabled (like
NVPTX for Cuda codegen tests) but this is handled by CMake already.

Added: 
    

Modified: 
    mlir/tools/mlir-opt/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-opt/CMakeLists.txt b/mlir/tools/mlir-opt/CMakeLists.txt
index 2ae36d466dd4..60bf5a1d87f3 100644
--- a/mlir/tools/mlir-opt/CMakeLists.txt
+++ b/mlir/tools/mlir-opt/CMakeLists.txt
@@ -47,16 +47,6 @@ target_link_libraries(MLIRMlirOptMain
 add_llvm_tool(mlir-opt
  mlir-opt.cpp
 )
-# Manually expand the target library, since our MLIR libraries
-# aren't plugged into the LLVM dependency tracking. If we don't
-# do this then we can't insert the CodeGen library after ourselves
-llvm_expand_pseudo_components(TARGET_LIBS AllTargetsCodeGens)
-# Prepend LLVM in front of every target, this is how the library
-# are named with CMake
-SET(targets_to_link)
-FOREACH(t ${TARGET_LIBS})
-  LIST(APPEND targets_to_link "LLVM${t}")
-ENDFOREACH(t)
 
 llvm_update_compile_flags(mlir-opt)
 target_link_libraries(mlir-opt PRIVATE ${LIBS} ${targets_to_link})


        


More information about the Mlir-commits mailing list