[llvm] c6ef6e1 - [build] normalize components dependencies
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 17 01:44:41 PST 2020
Author: serge-sans-paille
Date: 2020-11-17T10:42:34+01:00
New Revision: c6ef6e1690d517b3401ea06b1fe46871eb67434d
URL: https://github.com/llvm/llvm-project/commit/c6ef6e1690d517b3401ea06b1fe46871eb67434d
DIFF: https://github.com/llvm/llvm-project/commit/c6ef6e1690d517b3401ea06b1fe46871eb67434d.diff
LOG: [build] normalize components dependencies
Use LINK_COMPONENTS instead of explicit target_link_libraries for components.
This avoids redundancy and potential inconsistencies.
Differential Revision: https://reviews.llvm.org/D91461
Added:
Modified:
llvm/lib/ExecutionEngine/CMakeLists.txt
llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
llvm/lib/FileCheck/CMakeLists.txt
llvm/lib/Frontend/OpenACC/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/CMakeLists.txt b/llvm/lib/ExecutionEngine/CMakeLists.txt
index 22203da90f7a..49a597acb37b 100644
--- a/llvm/lib/ExecutionEngine/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/CMakeLists.txt
@@ -22,10 +22,6 @@ add_llvm_component_library(LLVMExecutionEngine
Target
)
-if(BUILD_SHARED_LIBS)
- target_link_libraries(LLVMExecutionEngine PUBLIC LLVMRuntimeDyld)
-endif()
-
add_subdirectory(Interpreter)
add_subdirectory(JITLink)
add_subdirectory(MCJIT)
diff --git a/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt b/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
index 512e3523a1ea..d8088b4fe5a2 100644
--- a/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
@@ -24,10 +24,3 @@ add_llvm_component_library(LLVMJITLink
OrcTargetProcess
Support
)
-
-target_link_libraries(LLVMJITLink
- PRIVATE
- LLVMObject
- LLVMOrcTargetProcess
- LLVMSupport
-)
diff --git a/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt b/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
index 791b037323f2..cba92a24ebcb 100644
--- a/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
@@ -32,6 +32,9 @@ add_llvm_component_library(LLVMOrcJIT
intrinsics_gen
LINK_COMPONENTS
+ Analysis
+ BitReader
+ BitWriter
Core
ExecutionEngine
JITLink
@@ -48,11 +51,3 @@ add_llvm_component_library(LLVMOrcJIT
add_subdirectory(Shared)
add_subdirectory(TargetProcess)
-
-target_link_libraries(LLVMOrcJIT
- PRIVATE
- LLVMAnalysis
- LLVMBitReader
- LLVMBitWriter
- LLVMPasses
- )
diff --git a/llvm/lib/FileCheck/CMakeLists.txt b/llvm/lib/FileCheck/CMakeLists.txt
index 91c80e1482f1..1e3456279ea0 100644
--- a/llvm/lib/FileCheck/CMakeLists.txt
+++ b/llvm/lib/FileCheck/CMakeLists.txt
@@ -3,6 +3,7 @@ add_llvm_component_library(LLVMFileCheck
ADDITIONAL_HEADER_DIRS
"${LLVM_MAIN_INCLUDE_DIR}/llvm/FileCheck"
-)
-target_link_libraries(LLVMFileCheck LLVMSupport)
+ LINK_COMPONENTS
+ Support
+)
diff --git a/llvm/lib/Frontend/OpenACC/CMakeLists.txt b/llvm/lib/Frontend/OpenACC/CMakeLists.txt
index ba340ab9c561..3667f46e8e31 100644
--- a/llvm/lib/Frontend/OpenACC/CMakeLists.txt
+++ b/llvm/lib/Frontend/OpenACC/CMakeLists.txt
@@ -12,7 +12,7 @@ add_llvm_component_library(LLVMFrontendOpenACC
DEPENDS
acc_gen
acc_cpp
-)
-
-target_link_libraries(LLVMFrontendOpenACC LLVMSupport)
+ LINK_COMPONENTS
+ Support
+)
More information about the llvm-commits
mailing list