forked from OSchip/llvm-project
Break false dependencies on target libraries
Summary: For the most part this consists of replacing ${LLVM_TARGETS_TO_BUILD} with some combination of AllTargets* so that they depend on specific components of a target backend rather than all of it. The overall effect of this is that, for example, tools like opt no longer falsely depend on the disassembler, while tools like llvm-ar no longer depend on the code generator. There's a couple quirks to point out here: * AllTargetsCodeGens is a bit more prevalent than expected. Tools like dsymutil seem to need it which I was surprised by. * llvm-xray linked to all the backends but doesn't seem to need any of them. It builds and passes the tests so that seems to be correct. * I left gold out as it's not built when binutils is not available so I'm unable to test it Reviewers: bogner, JDevlieghere Reviewed By: bogner Subscribers: mehdi_amini, mgorny, steven_wu, dexonsmith, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62331 llvm-svn: 361567
This commit is contained in:
parent
ac95c86511
commit
3e4acaabb9
llvm
cmake/modules
tools
bugpoint
dsymutil
llc
llvm-ar
llvm-c-test
llvm-cxxdump
llvm-dwp
llvm-lto
llvm-lto2
llvm-rtdyld
llvm-xray
lto
opt
|
@ -209,6 +209,13 @@ function(llvm_map_components_to_libnames out_libs)
|
|||
# already processed
|
||||
elseif( c STREQUAL "all" )
|
||||
list(APPEND expanded_components ${LLVM_AVAILABLE_LIBS})
|
||||
elseif( c STREQUAL "AllTargetsCodeGens" )
|
||||
# Link all the asm printers from all the targets
|
||||
foreach(t ${LLVM_TARGETS_TO_BUILD})
|
||||
if( TARGET LLVM${t}CodeGen)
|
||||
list(APPEND expanded_components "LLVM${t}CodeGen")
|
||||
endif()
|
||||
endforeach(t)
|
||||
elseif( c STREQUAL "AllTargetsAsmPrinters" )
|
||||
# Link all the asm printers from all the targets
|
||||
foreach(t ${LLVM_TARGETS_TO_BUILD})
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsAsmParsers
|
||||
AllTargetsCodeGens
|
||||
Analysis
|
||||
BitWriter
|
||||
CodeGen
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsAsmPrinters
|
||||
AllTargetsCodeGens
|
||||
AllTargetsDescs
|
||||
AllTargetsInfos
|
||||
AsmPrinter
|
||||
DebugInfoDWARF
|
||||
MC
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsAsmParsers
|
||||
AllTargetsCodeGens
|
||||
Analysis
|
||||
AsmPrinter
|
||||
CodeGen
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsAsmParsers
|
||||
AllTargetsDescs
|
||||
AllTargetsInfos
|
||||
BinaryFormat
|
||||
Core
|
||||
DlltoolDriver
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsAsmParsers
|
||||
AllTargetsCodeGens
|
||||
AllTargetsDisassemblers
|
||||
BitReader
|
||||
Core
|
||||
MCDisassembler
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsInfos
|
||||
Object
|
||||
Support
|
||||
)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsAsmParsers
|
||||
AllTargetsCodeGens
|
||||
AsmPrinter
|
||||
DebugInfoDWARF
|
||||
MC
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsAsmParsers
|
||||
AllTargetsCodeGens
|
||||
BitReader
|
||||
BitWriter
|
||||
Core
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsAsmParsers
|
||||
AllTargetsCodeGens
|
||||
AllTargetsDescs
|
||||
BitReader
|
||||
Core
|
||||
Linker
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsDisassemblers
|
||||
AllTargetsDescs
|
||||
AllTargetsInfos
|
||||
DebugInfoDWARF
|
||||
ExecutionEngine
|
||||
MC
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
DebugInfoDWARF
|
||||
Object
|
||||
Support
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsAsmParsers
|
||||
AllTargetsCodeGens
|
||||
AllTargetsDescs
|
||||
AllTargetsDisassemblers
|
||||
AllTargetsInfos
|
||||
BitReader
|
||||
Core
|
||||
LTO
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
AllTargetsAsmParsers
|
||||
AllTargetsCodeGens
|
||||
AllTargetsInfos
|
||||
AggressiveInstCombine
|
||||
Analysis
|
||||
BitWriter
|
||||
|
|
Loading…
Reference in New Issue