llvm.org GIT mirror llvm / 6519fa1
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361567 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Sanders 3 months ago
14 changed file(s) with 40 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
208208 # already processed
209209 elseif( c STREQUAL "all" )
210210 list(APPEND expanded_components ${LLVM_AVAILABLE_LIBS})
211 elseif( c STREQUAL "AllTargetsCodeGens" )
212 # Link all the asm printers from all the targets
213 foreach(t ${LLVM_TARGETS_TO_BUILD})
214 if( TARGET LLVM${t}CodeGen)
215 list(APPEND expanded_components "LLVM${t}CodeGen")
216 endif()
217 endforeach(t)
211218 elseif( c STREQUAL "AllTargetsAsmPrinters" )
212219 # Link all the asm printers from all the targets
213220 foreach(t ${LLVM_TARGETS_TO_BUILD})
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsAsmParsers
2 AllTargetsCodeGens
23 Analysis
34 BitWriter
45 CodeGen
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsAsmPrinters
2 AllTargetsCodeGens
3 AllTargetsDescs
4 AllTargetsInfos
25 AsmPrinter
36 DebugInfoDWARF
47 MC
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsAsmParsers
2 AllTargetsCodeGens
23 Analysis
34 AsmPrinter
45 CodeGen
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsAsmParsers
2 AllTargetsDescs
3 AllTargetsInfos
24 BinaryFormat
35 Core
46 DlltoolDriver
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsAsmParsers
2 AllTargetsCodeGens
3 AllTargetsDisassemblers
24 BitReader
35 Core
46 MCDisassembler
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsInfos
22 Object
33 Support
44 )
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsAsmParsers
2 AllTargetsCodeGens
23 AsmPrinter
34 DebugInfoDWARF
45 MC
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsAsmParsers
2 AllTargetsCodeGens
23 BitReader
34 BitWriter
45 Core
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsAsmParsers
2 AllTargetsCodeGens
3 AllTargetsDescs
24 BitReader
35 Core
46 Linker
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsDisassemblers
2 AllTargetsDescs
3 AllTargetsInfos
24 DebugInfoDWARF
35 ExecutionEngine
46 MC
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
21 DebugInfoDWARF
32 Object
43 Support
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsAsmParsers
2 AllTargetsCodeGens
3 AllTargetsDescs
4 AllTargetsDisassemblers
5 AllTargetsInfos
26 BitReader
37 Core
48 LTO
0 set(LLVM_LINK_COMPONENTS
1 ${LLVM_TARGETS_TO_BUILD}
1 AllTargetsAsmParsers
2 AllTargetsCodeGens
3 AllTargetsInfos
24 AggressiveInstCombine
35 Analysis
46 BitWriter