Index: cmake/modules/LLVM-Config.cmake =================================================================== --- cmake/modules/LLVM-Config.cmake +++ cmake/modules/LLVM-Config.cmake @@ -209,6 +209,13 @@ # 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}) Index: tools/bugpoint/CMakeLists.txt =================================================================== --- tools/bugpoint/CMakeLists.txt +++ tools/bugpoint/CMakeLists.txt @@ -1,5 +1,6 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsAsmParsers + AllTargetsCodeGens Analysis BitWriter CodeGen Index: tools/dsymutil/CMakeLists.txt =================================================================== --- tools/dsymutil/CMakeLists.txt +++ tools/dsymutil/CMakeLists.txt @@ -1,5 +1,8 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsAsmPrinters + AllTargetsCodeGens + AllTargetsDescs + AllTargetsInfos AsmPrinter DebugInfoDWARF MC Index: tools/llc/CMakeLists.txt =================================================================== --- tools/llc/CMakeLists.txt +++ tools/llc/CMakeLists.txt @@ -1,5 +1,6 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsAsmParsers + AllTargetsCodeGens Analysis AsmPrinter CodeGen Index: tools/llvm-ar/CMakeLists.txt =================================================================== --- tools/llvm-ar/CMakeLists.txt +++ tools/llvm-ar/CMakeLists.txt @@ -1,5 +1,7 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsAsmParsers + AllTargetsDescs + AllTargetsInfos BinaryFormat Core DlltoolDriver Index: tools/llvm-c-test/CMakeLists.txt =================================================================== --- tools/llvm-c-test/CMakeLists.txt +++ tools/llvm-c-test/CMakeLists.txt @@ -1,5 +1,7 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsAsmParsers + AllTargetsCodeGens + AllTargetsDisassemblers BitReader Core MCDisassembler Index: tools/llvm-cxxdump/CMakeLists.txt =================================================================== --- tools/llvm-cxxdump/CMakeLists.txt +++ tools/llvm-cxxdump/CMakeLists.txt @@ -1,5 +1,5 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsInfos Object Support ) Index: tools/llvm-dwp/CMakeLists.txt =================================================================== --- tools/llvm-dwp/CMakeLists.txt +++ tools/llvm-dwp/CMakeLists.txt @@ -1,5 +1,6 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsAsmParsers + AllTargetsCodeGens AsmPrinter DebugInfoDWARF MC Index: tools/llvm-lto/CMakeLists.txt =================================================================== --- tools/llvm-lto/CMakeLists.txt +++ tools/llvm-lto/CMakeLists.txt @@ -1,5 +1,6 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsAsmParsers + AllTargetsCodeGens BitReader BitWriter Core Index: tools/llvm-lto2/CMakeLists.txt =================================================================== --- tools/llvm-lto2/CMakeLists.txt +++ tools/llvm-lto2/CMakeLists.txt @@ -1,5 +1,7 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsAsmParsers + AllTargetsCodeGens + AllTargetsDescs BitReader Core Linker Index: tools/llvm-rtdyld/CMakeLists.txt =================================================================== --- tools/llvm-rtdyld/CMakeLists.txt +++ tools/llvm-rtdyld/CMakeLists.txt @@ -1,5 +1,7 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsDisassemblers + AllTargetsDescs + AllTargetsInfos DebugInfoDWARF ExecutionEngine MC Index: tools/llvm-xray/CMakeLists.txt =================================================================== --- tools/llvm-xray/CMakeLists.txt +++ tools/llvm-xray/CMakeLists.txt @@ -1,5 +1,4 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} DebugInfoDWARF Object Support Index: tools/lto/CMakeLists.txt =================================================================== --- tools/lto/CMakeLists.txt +++ tools/lto/CMakeLists.txt @@ -1,5 +1,9 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsAsmParsers + AllTargetsCodeGens + AllTargetsDescs + AllTargetsDisassemblers + AllTargetsInfos BitReader Core LTO Index: tools/opt/CMakeLists.txt =================================================================== --- tools/opt/CMakeLists.txt +++ tools/opt/CMakeLists.txt @@ -1,5 +1,7 @@ set(LLVM_LINK_COMPONENTS - ${LLVM_TARGETS_TO_BUILD} + AllTargetsAsmParsers + AllTargetsCodeGens + AllTargetsInfos AggressiveInstCombine Analysis BitWriter