Skip to content

Commit

Permalink
[build] normalize components dependencies
Browse files Browse the repository at this point in the history
Use LINK_COMPONENTS instead of explicit target_link_libraries for components.
This avoids redundancy and potential inconsistencies.

Differential Revision: https://reviews.llvm.org/D91461
  • Loading branch information
serge-sans-paille committed Nov 17, 2020
1 parent c2460c3 commit c6ef6e1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 24 deletions.
4 changes: 0 additions & 4 deletions llvm/lib/ExecutionEngine/CMakeLists.txt
Expand Up @@ -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)
Expand Down
7 changes: 0 additions & 7 deletions llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
Expand Up @@ -24,10 +24,3 @@ add_llvm_component_library(LLVMJITLink
OrcTargetProcess
Support
)

target_link_libraries(LLVMJITLink
PRIVATE
LLVMObject
LLVMOrcTargetProcess
LLVMSupport
)
11 changes: 3 additions & 8 deletions llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
Expand Up @@ -32,6 +32,9 @@ add_llvm_component_library(LLVMOrcJIT
intrinsics_gen

LINK_COMPONENTS
Analysis
BitReader
BitWriter
Core
ExecutionEngine
JITLink
Expand All @@ -48,11 +51,3 @@ add_llvm_component_library(LLVMOrcJIT

add_subdirectory(Shared)
add_subdirectory(TargetProcess)

target_link_libraries(LLVMOrcJIT
PRIVATE
LLVMAnalysis
LLVMBitReader
LLVMBitWriter
LLVMPasses
)
5 changes: 3 additions & 2 deletions llvm/lib/FileCheck/CMakeLists.txt
Expand Up @@ -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
)
6 changes: 3 additions & 3 deletions llvm/lib/Frontend/OpenACC/CMakeLists.txt
Expand Up @@ -12,7 +12,7 @@ add_llvm_component_library(LLVMFrontendOpenACC
DEPENDS
acc_gen
acc_cpp
)

target_link_libraries(LLVMFrontendOpenACC LLVMSupport)

LINK_COMPONENTS
Support
)

0 comments on commit c6ef6e1

Please sign in to comment.