diff --git a/llvm/lib/Analysis/CMakeLists.txt b/llvm/lib/Analysis/CMakeLists.txt --- a/llvm/lib/Analysis/CMakeLists.txt +++ b/llvm/lib/Analysis/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + BinaryFormat + Core + Object + ProfileData + Support + ) + add_llvm_library(LLVMAnalysis AliasAnalysis.cpp AliasAnalysisEvaluator.cpp diff --git a/llvm/lib/AsmParser/CMakeLists.txt b/llvm/lib/AsmParser/CMakeLists.txt --- a/llvm/lib/AsmParser/CMakeLists.txt +++ b/llvm/lib/AsmParser/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + BinaryFormat + Core + Support + ) + # AsmParser add_llvm_library(LLVMAsmParser LLLexer.cpp diff --git a/llvm/lib/BinaryFormat/CMakeLists.txt b/llvm/lib/BinaryFormat/CMakeLists.txt --- a/llvm/lib/BinaryFormat/CMakeLists.txt +++ b/llvm/lib/BinaryFormat/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMBinaryFormat AMDGPUMetadataVerifier.cpp Dwarf.cpp diff --git a/llvm/lib/Bitcode/Reader/CMakeLists.txt b/llvm/lib/Bitcode/Reader/CMakeLists.txt --- a/llvm/lib/Bitcode/Reader/CMakeLists.txt +++ b/llvm/lib/Bitcode/Reader/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + BitstreamReader + Core + Support + ) + add_llvm_library(LLVMBitReader BitcodeAnalyzer.cpp BitReader.cpp diff --git a/llvm/lib/Bitcode/Writer/CMakeLists.txt b/llvm/lib/Bitcode/Writer/CMakeLists.txt --- a/llvm/lib/Bitcode/Writer/CMakeLists.txt +++ b/llvm/lib/Bitcode/Writer/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + Analysis + Core + MC + Object + Support + ) + add_llvm_library(LLVMBitWriter BitWriter.cpp BitcodeWriter.cpp diff --git a/llvm/lib/Bitstream/Reader/CMakeLists.txt b/llvm/lib/Bitstream/Reader/CMakeLists.txt --- a/llvm/lib/Bitstream/Reader/CMakeLists.txt +++ b/llvm/lib/Bitstream/Reader/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMBitstreamReader BitstreamReader.cpp diff --git a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt --- a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt +++ b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt @@ -1,3 +1,18 @@ +set(LLVM_LINK_COMPONENTS + Analysis + BinaryFormat + CodeGen + Core + DebugInfoCodeView + DebugInfoDWARF + DebugInfoMSF + MC + MCParser + Remarks + Support + Target + ) + add_llvm_library(LLVMAsmPrinter AccelTable.cpp AddressPool.cpp diff --git a/llvm/lib/CodeGen/CMakeLists.txt b/llvm/lib/CodeGen/CMakeLists.txt --- a/llvm/lib/CodeGen/CMakeLists.txt +++ b/llvm/lib/CodeGen/CMakeLists.txt @@ -1,3 +1,16 @@ +set(LLVM_LINK_COMPONENTS + Analysis + BitReader + BitWriter + Core + MC + ProfileData + Scalar + Support + Target + TransformUtils + ) + add_llvm_library(LLVMCodeGen AggressiveAntiDepBreaker.cpp AllocationOrder.cpp diff --git a/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt b/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt --- a/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt +++ b/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt @@ -1,3 +1,14 @@ +set(LLVM_LINK_COMPONENTS + Analysis + CodeGen + Core + MC + SelectionDAG + Support + Target + TransformUtils + ) + add_llvm_library(LLVMGlobalISel CSEInfo.cpp CSEMIRBuilder.cpp diff --git a/llvm/lib/CodeGen/MIRParser/CMakeLists.txt b/llvm/lib/CodeGen/MIRParser/CMakeLists.txt --- a/llvm/lib/CodeGen/MIRParser/CMakeLists.txt +++ b/llvm/lib/CodeGen/MIRParser/CMakeLists.txt @@ -1,3 +1,13 @@ +set(LLVM_LINK_COMPONENTS + AsmParser + BinaryFormat + CodeGen + Core + MC + Support + Target + ) + add_llvm_library(LLVMMIRParser MILexer.cpp MIParser.cpp diff --git a/llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt b/llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt --- a/llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt +++ b/llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt @@ -1,3 +1,13 @@ +set(LLVM_LINK_COMPONENTS + Analysis + CodeGen + Core + MC + Support + Target + TransformUtils + ) + add_llvm_library(LLVMSelectionDAG DAGCombiner.cpp FastISel.cpp diff --git a/llvm/lib/DebugInfo/CodeView/CMakeLists.txt b/llvm/lib/DebugInfo/CodeView/CMakeLists.txt --- a/llvm/lib/DebugInfo/CodeView/CMakeLists.txt +++ b/llvm/lib/DebugInfo/CodeView/CMakeLists.txt @@ -1,3 +1,8 @@ +set(LLVM_LINK_COMPONENTS + DebugInfoMSF + Support + ) + add_llvm_library(LLVMDebugInfoCodeView AppendingTypeTableBuilder.cpp CodeViewError.cpp diff --git a/llvm/lib/DebugInfo/DWARF/CMakeLists.txt b/llvm/lib/DebugInfo/DWARF/CMakeLists.txt --- a/llvm/lib/DebugInfo/DWARF/CMakeLists.txt +++ b/llvm/lib/DebugInfo/DWARF/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + BinaryFormat + MC + Object + Support + ) + add_llvm_library(LLVMDebugInfoDWARF DWARFAbbreviationDeclaration.cpp DWARFAddressRange.cpp diff --git a/llvm/lib/DebugInfo/GSYM/CMakeLists.txt b/llvm/lib/DebugInfo/GSYM/CMakeLists.txt --- a/llvm/lib/DebugInfo/GSYM/CMakeLists.txt +++ b/llvm/lib/DebugInfo/GSYM/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMDebugInfoGSYM FunctionInfo.cpp InlineInfo.cpp diff --git a/llvm/lib/DebugInfo/MSF/CMakeLists.txt b/llvm/lib/DebugInfo/MSF/CMakeLists.txt --- a/llvm/lib/DebugInfo/MSF/CMakeLists.txt +++ b/llvm/lib/DebugInfo/MSF/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMDebugInfoMSF MappedBlockStream.cpp MSFBuilder.cpp diff --git a/llvm/lib/DebugInfo/PDB/CMakeLists.txt b/llvm/lib/DebugInfo/PDB/CMakeLists.txt --- a/llvm/lib/DebugInfo/PDB/CMakeLists.txt +++ b/llvm/lib/DebugInfo/PDB/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + DebugInfoCodeView + DebugInfoMSF + Object + Support + ) + macro(add_pdb_impl_folder group) list(APPEND PDB_IMPL_SOURCES ${ARGN}) source_group(${group} FILES ${ARGN}) diff --git a/llvm/lib/DebugInfo/Symbolize/CMakeLists.txt b/llvm/lib/DebugInfo/Symbolize/CMakeLists.txt --- a/llvm/lib/DebugInfo/Symbolize/CMakeLists.txt +++ b/llvm/lib/DebugInfo/Symbolize/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + DebugInfoDWARF + DebugInfoPDB + Demangle + Object + Support + ) + add_llvm_library(LLVMSymbolize DIPrinter.cpp SymbolizableObjectFile.cpp diff --git a/llvm/lib/Demangle/CMakeLists.txt b/llvm/lib/Demangle/CMakeLists.txt --- a/llvm/lib/Demangle/CMakeLists.txt +++ b/llvm/lib/Demangle/CMakeLists.txt @@ -1,3 +1,6 @@ +set(LLVM_LINK_COMPONENTS + ) + add_llvm_library(LLVMDemangle Demangle.cpp ItaniumDemangle.cpp diff --git a/llvm/lib/ExecutionEngine/CMakeLists.txt b/llvm/lib/ExecutionEngine/CMakeLists.txt --- a/llvm/lib/ExecutionEngine/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + Core + MC + Object + RuntimeDyld + Support + Target + ) + add_llvm_library(LLVMExecutionEngine diff --git a/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt b/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt --- a/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + CodeGen + Core + DebugInfoDWARF + ExecutionEngine + Object + Support + ) + include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ) if( HAVE_LIBDL ) diff --git a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt --- a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + CodeGen + Core + ExecutionEngine + Support + ) + # Make sure that the path to libffi headers is on the command # line. That path can be a compiler's non-default path even when # FFI_INCLUDE_DIR was not used, because cmake has its own paths for diff --git a/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt b/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt --- a/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + BinaryFormat + Object + Support + ) + add_llvm_library(LLVMJITLink JITLink.cpp JITLinkGeneric.cpp diff --git a/llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt b/llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt --- a/llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + Core + ExecutionEngine + Object + RuntimeDyld + Support + Target + ) + add_llvm_library(LLVMMCJIT MCJIT.cpp diff --git a/llvm/lib/ExecutionEngine/OProfileJIT/CMakeLists.txt b/llvm/lib/ExecutionEngine/OProfileJIT/CMakeLists.txt --- a/llvm/lib/ExecutionEngine/OProfileJIT/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/OProfileJIT/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + DebugInfoDWARF + ExecutionEngine + Object + Support + ) + include_directories( ${LLVM_OPROFILE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/.. ) diff --git a/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt b/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt --- a/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt @@ -1,3 +1,15 @@ +set(LLVM_LINK_COMPONENTS + Core + ExecutionEngine + JITLink + MC + Object + RuntimeDyld + Support + Target + TransformUtils + ) + add_llvm_library(LLVMOrcJIT CompileOnDemandLayer.cpp CompileUtils.cpp diff --git a/llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt b/llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt --- a/llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + CodeGen + Core + DebugInfoDWARF + ExecutionEngine + Object + Support + ) + add_llvm_library(LLVMPerfJITEvents PerfJITEventListener.cpp ) diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt b/llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt --- a/llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MC + Object + Support + ) + add_llvm_library(LLVMRuntimeDyld JITSymbol.cpp RTDyldMemoryManager.cpp diff --git a/llvm/lib/FuzzMutate/CMakeLists.txt b/llvm/lib/FuzzMutate/CMakeLists.txt --- a/llvm/lib/FuzzMutate/CMakeLists.txt +++ b/llvm/lib/FuzzMutate/CMakeLists.txt @@ -1,3 +1,13 @@ +set(LLVM_LINK_COMPONENTS + Analysis + BitReader + BitWriter + Core + Scalar + Support + Target + ) + add_llvm_library(LLVMFuzzMutate FuzzerCLI.cpp IRMutator.cpp diff --git a/llvm/lib/IR/CMakeLists.txt b/llvm/lib/IR/CMakeLists.txt --- a/llvm/lib/IR/CMakeLists.txt +++ b/llvm/lib/IR/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + BinaryFormat + Remarks + Support + ) + set(LLVM_TARGET_DEFINITIONS AttributesCompatFunc.td) tablegen(LLVM AttributesCompatFunc.inc -gen-attrs) add_public_tablegen_target(AttributeCompatFuncTableGen) diff --git a/llvm/lib/IRReader/CMakeLists.txt b/llvm/lib/IRReader/CMakeLists.txt --- a/llvm/lib/IRReader/CMakeLists.txt +++ b/llvm/lib/IRReader/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + AsmParser + BitReader + Core + Support + ) + add_llvm_library(LLVMIRReader IRReader.cpp diff --git a/llvm/lib/LTO/CMakeLists.txt b/llvm/lib/LTO/CMakeLists.txt --- a/llvm/lib/LTO/CMakeLists.txt +++ b/llvm/lib/LTO/CMakeLists.txt @@ -1,3 +1,24 @@ +set(LLVM_LINK_COMPONENTS + AggressiveInstCombine + Analysis + BitReader + BitWriter + CodeGen + Core + IPO + InstCombine + Linker + MC + ObjCARC + Object + Passes + Remarks + Scalar + Support + Target + TransformUtils + ) + add_llvm_library(LLVMLTO Caching.cpp LTO.cpp diff --git a/llvm/lib/LineEditor/CMakeLists.txt b/llvm/lib/LineEditor/CMakeLists.txt --- a/llvm/lib/LineEditor/CMakeLists.txt +++ b/llvm/lib/LineEditor/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + if(HAVE_LIBEDIT) set(link_libs edit) endif() diff --git a/llvm/lib/Linker/CMakeLists.txt b/llvm/lib/Linker/CMakeLists.txt --- a/llvm/lib/Linker/CMakeLists.txt +++ b/llvm/lib/Linker/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + Core + Support + TransformUtils + ) + add_llvm_library(LLVMLinker IRMover.cpp LinkModules.cpp diff --git a/llvm/lib/MC/CMakeLists.txt b/llvm/lib/MC/CMakeLists.txt --- a/llvm/lib/MC/CMakeLists.txt +++ b/llvm/lib/MC/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + BinaryFormat + DebugInfoCodeView + Support + ) + add_llvm_library(LLVMMC ConstantPools.cpp ELFObjectWriter.cpp diff --git a/llvm/lib/MC/MCDisassembler/CMakeLists.txt b/llvm/lib/MC/MCDisassembler/CMakeLists.txt --- a/llvm/lib/MC/MCDisassembler/CMakeLists.txt +++ b/llvm/lib/MC/MCDisassembler/CMakeLists.txt @@ -1,3 +1,8 @@ +set(LLVM_LINK_COMPONENTS + MC + Support + ) + add_llvm_library(LLVMMCDisassembler Disassembler.cpp MCDisassembler.cpp diff --git a/llvm/lib/MC/MCParser/CMakeLists.txt b/llvm/lib/MC/MCParser/CMakeLists.txt --- a/llvm/lib/MC/MCParser/CMakeLists.txt +++ b/llvm/lib/MC/MCParser/CMakeLists.txt @@ -1,3 +1,8 @@ +set(LLVM_LINK_COMPONENTS + MC + Support + ) + add_llvm_library(LLVMMCParser AsmLexer.cpp AsmParser.cpp diff --git a/llvm/lib/MCA/CMakeLists.txt b/llvm/lib/MCA/CMakeLists.txt --- a/llvm/lib/MCA/CMakeLists.txt +++ b/llvm/lib/MCA/CMakeLists.txt @@ -1,3 +1,8 @@ +set(LLVM_LINK_COMPONENTS + MC + Support + ) + add_llvm_library(LLVMMCA Context.cpp HWEventListener.cpp diff --git a/llvm/lib/Object/CMakeLists.txt b/llvm/lib/Object/CMakeLists.txt --- a/llvm/lib/Object/CMakeLists.txt +++ b/llvm/lib/Object/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + BinaryFormat + BitReader + Core + MC + MCParser + Support + ) + add_llvm_library(LLVMObject Archive.cpp ArchiveWriter.cpp diff --git a/llvm/lib/ObjectYAML/CMakeLists.txt b/llvm/lib/ObjectYAML/CMakeLists.txt --- a/llvm/lib/ObjectYAML/CMakeLists.txt +++ b/llvm/lib/ObjectYAML/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + DebugInfoCodeView + Object + Support + ) + add_llvm_library(LLVMObjectYAML CodeViewYAMLDebugSections.cpp CodeViewYAMLSymbols.cpp diff --git a/llvm/lib/Option/CMakeLists.txt b/llvm/lib/Option/CMakeLists.txt --- a/llvm/lib/Option/CMakeLists.txt +++ b/llvm/lib/Option/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMOption Arg.cpp ArgList.cpp diff --git a/llvm/lib/Passes/CMakeLists.txt b/llvm/lib/Passes/CMakeLists.txt --- a/llvm/lib/Passes/CMakeLists.txt +++ b/llvm/lib/Passes/CMakeLists.txt @@ -1,3 +1,18 @@ +set(LLVM_LINK_COMPONENTS + AggressiveInstCombine + Analysis + CodeGen + Core + IPO + InstCombine + Instrumentation + Scalar + Support + Target + TransformUtils + Vectorize + ) + if (MSVC) set_source_files_properties(PassBuilder.cpp PROPERTIES COMPILE_FLAGS /bigobj) endif() diff --git a/llvm/lib/ProfileData/CMakeLists.txt b/llvm/lib/ProfileData/CMakeLists.txt --- a/llvm/lib/ProfileData/CMakeLists.txt +++ b/llvm/lib/ProfileData/CMakeLists.txt @@ -1,3 +1,8 @@ +set(LLVM_LINK_COMPONENTS + Core + Support + ) + add_llvm_library(LLVMProfileData GCOV.cpp InstrProf.cpp diff --git a/llvm/lib/ProfileData/Coverage/CMakeLists.txt b/llvm/lib/ProfileData/Coverage/CMakeLists.txt --- a/llvm/lib/ProfileData/Coverage/CMakeLists.txt +++ b/llvm/lib/ProfileData/Coverage/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + Core + Object + ProfileData + Support + ) + add_llvm_library(LLVMCoverage CoverageMapping.cpp CoverageMappingWriter.cpp diff --git a/llvm/lib/Remarks/CMakeLists.txt b/llvm/lib/Remarks/CMakeLists.txt --- a/llvm/lib/Remarks/CMakeLists.txt +++ b/llvm/lib/Remarks/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMRemarks Remark.cpp RemarkFormat.cpp diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt --- a/llvm/lib/Support/CMakeLists.txt +++ b/llvm/lib/Support/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Demangle + ) + set(system_libs) if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ ) set(system_libs ${system_libs} ${ZLIB_LIBRARIES}) diff --git a/llvm/lib/TableGen/CMakeLists.txt b/llvm/lib/TableGen/CMakeLists.txt --- a/llvm/lib/TableGen/CMakeLists.txt +++ b/llvm/lib/TableGen/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMTableGen Error.cpp JSONBackend.cpp diff --git a/llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt b/llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + AArch64Desc + AArch64Info + AArch64Utils + MC + MCParser + Support + ) + include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) add_llvm_library(LLVMAArch64AsmParser diff --git a/llvm/lib/Target/AArch64/CMakeLists.txt b/llvm/lib/Target/AArch64/CMakeLists.txt --- a/llvm/lib/Target/AArch64/CMakeLists.txt +++ b/llvm/lib/Target/AArch64/CMakeLists.txt @@ -1,3 +1,20 @@ +set(LLVM_LINK_COMPONENTS + AArch64Desc + AArch64Info + AArch64Utils + Analysis + AsmPrinter + CodeGen + Core + GlobalISel + MC + Scalar + SelectionDAG + Support + Target + TransformUtils + ) + set(LLVM_TARGET_DEFINITIONS AArch64.td) tablegen(LLVM AArch64GenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt b/llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + AArch64Desc + AArch64Info + AArch64Utils + MC + MCDisassembler + Support + ) + include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) add_llvm_library(LLVMAArch64Disassembler diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + AArch64Info + AArch64Utils + MC + Support + ) + add_llvm_library(LLVMAArch64Desc AArch64AsmBackend.cpp AArch64ELFObjectWriter.cpp diff --git a/llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt b/llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) add_llvm_library(LLVMAArch64Info diff --git a/llvm/lib/Target/AArch64/Utils/CMakeLists.txt b/llvm/lib/Target/AArch64/Utils/CMakeLists.txt --- a/llvm/lib/Target/AArch64/Utils/CMakeLists.txt +++ b/llvm/lib/Target/AArch64/Utils/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMAArch64Utils AArch64BaseInfo.cpp ) diff --git a/llvm/lib/Target/AMDGPU/AsmParser/CMakeLists.txt b/llvm/lib/Target/AMDGPU/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/AMDGPU/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/AMDGPU/AsmParser/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + AMDGPUDesc + AMDGPUInfo + AMDGPUUtils + MC + MCParser + Support + ) + add_llvm_library(LLVMAMDGPUAsmParser AMDGPUAsmParser.cpp ) diff --git a/llvm/lib/Target/AMDGPU/CMakeLists.txt b/llvm/lib/Target/AMDGPU/CMakeLists.txt --- a/llvm/lib/Target/AMDGPU/CMakeLists.txt +++ b/llvm/lib/Target/AMDGPU/CMakeLists.txt @@ -1,3 +1,24 @@ +set(LLVM_LINK_COMPONENTS + AMDGPUDesc + AMDGPUInfo + AMDGPUUtils + Analysis + AsmPrinter + BinaryFormat + CodeGen + Core + GlobalISel + IPO + MC + MIRParser + Scalar + SelectionDAG + Support + Target + TransformUtils + Vectorize + ) + set(LLVM_TARGET_DEFINITIONS AMDGPU.td) tablegen(LLVM AMDGPUGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt b/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + AMDGPUDesc + AMDGPUInfo + AMDGPUUtils + MC + MCDisassembler + Support + ) + include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) add_llvm_library(LLVMAMDGPUDisassembler diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + AMDGPUInfo + AMDGPUUtils + BinaryFormat + Core + MC + Support + ) + add_llvm_library(LLVMAMDGPUDesc AMDGPUAsmBackend.cpp AMDGPUELFObjectWriter.cpp diff --git a/llvm/lib/Target/AMDGPU/TargetInfo/CMakeLists.txt b/llvm/lib/Target/AMDGPU/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/AMDGPU/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/AMDGPU/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMAMDGPUInfo AMDGPUTargetInfo.cpp ) diff --git a/llvm/lib/Target/AMDGPU/Utils/CMakeLists.txt b/llvm/lib/Target/AMDGPU/Utils/CMakeLists.txt --- a/llvm/lib/Target/AMDGPU/Utils/CMakeLists.txt +++ b/llvm/lib/Target/AMDGPU/Utils/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + BinaryFormat + Core + MC + Support + ) + add_llvm_library(LLVMAMDGPUUtils AMDGPUBaseInfo.cpp AMDKernelCodeTUtils.cpp diff --git a/llvm/lib/Target/ARC/CMakeLists.txt b/llvm/lib/Target/ARC/CMakeLists.txt --- a/llvm/lib/Target/ARC/CMakeLists.txt +++ b/llvm/lib/Target/ARC/CMakeLists.txt @@ -1,3 +1,17 @@ +set(LLVM_LINK_COMPONENTS + ARCDesc + ARCInfo + Analysis + AsmPrinter + CodeGen + Core + MC + SelectionDAG + Support + Target + TransformUtils + ) + set(LLVM_TARGET_DEFINITIONS ARC.td) tablegen(LLVM ARCGenAsmWriter.inc -gen-asm-writer) diff --git a/llvm/lib/Target/ARC/Disassembler/CMakeLists.txt b/llvm/lib/Target/ARC/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/ARC/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/ARC/Disassembler/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + ARCInfo + MCDisassembler + Support + ) + add_llvm_library(LLVMARCDisassembler ARCDisassembler.cpp ) diff --git a/llvm/lib/Target/ARC/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/ARC/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/ARC/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/ARC/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + ARCInfo + MC + Support + ) + add_llvm_library(LLVMARCDesc ARCInstPrinter.cpp ARCMCTargetDesc.cpp diff --git a/llvm/lib/Target/ARC/TargetInfo/CMakeLists.txt b/llvm/lib/Target/ARC/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/ARC/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/ARC/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMARCInfo ARCTargetInfo.cpp ) diff --git a/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt b/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + ARMDesc + ARMInfo + ARMUtils + MC + MCParser + Support + ) + add_llvm_library(LLVMARMAsmParser ARMAsmParser.cpp ) diff --git a/llvm/lib/Target/ARM/CMakeLists.txt b/llvm/lib/Target/ARM/CMakeLists.txt --- a/llvm/lib/Target/ARM/CMakeLists.txt +++ b/llvm/lib/Target/ARM/CMakeLists.txt @@ -1,3 +1,20 @@ +set(LLVM_LINK_COMPONENTS + ARMDesc + ARMInfo + ARMUtils + Analysis + AsmPrinter + CodeGen + Core + GlobalISel + MC + Scalar + SelectionDAG + Support + Target + TransformUtils + ) + set(LLVM_TARGET_DEFINITIONS ARM.td) tablegen(LLVM ARMGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt b/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + ARMDesc + ARMInfo + ARMUtils + MCDisassembler + Support + ) + add_llvm_library(LLVMARMDisassembler ARMDisassembler.cpp ) diff --git a/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + ARMInfo + ARMUtils + MC + MCDisassembler + Support + ) + add_llvm_library(LLVMARMDesc ARMAsmBackend.cpp ARMELFObjectWriter.cpp diff --git a/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt b/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMARMInfo ARMTargetInfo.cpp ) diff --git a/llvm/lib/Target/ARM/Utils/CMakeLists.txt b/llvm/lib/Target/ARM/Utils/CMakeLists.txt --- a/llvm/lib/Target/ARM/Utils/CMakeLists.txt +++ b/llvm/lib/Target/ARM/Utils/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMARMUtils ARMBaseInfo.cpp ) diff --git a/llvm/lib/Target/AVR/AsmParser/CMakeLists.txt b/llvm/lib/Target/AVR/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/AVR/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/AVR/AsmParser/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + AVRDesc + AVRInfo + MC + MCParser + Support + ) + add_llvm_library(LLVMAVRAsmParser AVRAsmParser.cpp ) diff --git a/llvm/lib/Target/AVR/CMakeLists.txt b/llvm/lib/Target/AVR/CMakeLists.txt --- a/llvm/lib/Target/AVR/CMakeLists.txt +++ b/llvm/lib/Target/AVR/CMakeLists.txt @@ -1,3 +1,15 @@ +set(LLVM_LINK_COMPONENTS + AVRDesc + AVRInfo + AsmPrinter + CodeGen + Core + MC + SelectionDAG + Support + Target + ) + set(LLVM_TARGET_DEFINITIONS AVR.td) tablegen(LLVM AVRGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/AVR/Disassembler/CMakeLists.txt b/llvm/lib/Target/AVR/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/AVR/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/AVR/Disassembler/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + AVRInfo + MCDisassembler + Support + ) + add_llvm_library(LLVMAVRDisassembler AVRDisassembler.cpp ) diff --git a/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + AVRInfo + MC + Support + ) + add_llvm_library(LLVMAVRDesc AVRAsmBackend.cpp AVRELFObjectWriter.cpp diff --git a/llvm/lib/Target/AVR/TargetInfo/CMakeLists.txt b/llvm/lib/Target/AVR/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/AVR/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/AVR/TargetInfo/CMakeLists.txt @@ -1,3 +1,8 @@ +set(LLVM_LINK_COMPONENTS + MC + Support + ) + include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) diff --git a/llvm/lib/Target/BPF/AsmParser/CMakeLists.txt b/llvm/lib/Target/BPF/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/BPF/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/BPF/AsmParser/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + BPFDesc + BPFInfo + MC + MCParser + Support + ) + add_llvm_library(LLVMBPFAsmParser BPFAsmParser.cpp ) diff --git a/llvm/lib/Target/BPF/CMakeLists.txt b/llvm/lib/Target/BPF/CMakeLists.txt --- a/llvm/lib/Target/BPF/CMakeLists.txt +++ b/llvm/lib/Target/BPF/CMakeLists.txt @@ -1,3 +1,15 @@ +set(LLVM_LINK_COMPONENTS + AsmPrinter + BPFDesc + BPFInfo + CodeGen + Core + MC + SelectionDAG + Support + Target + ) + set(LLVM_TARGET_DEFINITIONS BPF.td) tablegen(LLVM BPFGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/BPF/Disassembler/CMakeLists.txt b/llvm/lib/Target/BPF/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/BPF/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/BPF/Disassembler/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + BPFInfo + MCDisassembler + Support + ) + add_llvm_library(LLVMBPFDisassembler BPFDisassembler.cpp ) diff --git a/llvm/lib/Target/BPF/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/BPF/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/BPF/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/BPF/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + BPFInfo + MC + Support + ) + add_llvm_library(LLVMBPFDesc BPFMCTargetDesc.cpp BPFAsmBackend.cpp diff --git a/llvm/lib/Target/BPF/TargetInfo/CMakeLists.txt b/llvm/lib/Target/BPF/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/BPF/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/BPF/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMBPFInfo BPFTargetInfo.cpp ) diff --git a/llvm/lib/Target/CMakeLists.txt b/llvm/lib/Target/CMakeLists.txt --- a/llvm/lib/Target/CMakeLists.txt +++ b/llvm/lib/Target/CMakeLists.txt @@ -1,3 +1,6 @@ +set(LLVM_LINK_COMPONENTS + ) + list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen) list(APPEND LLVM_TABLEGEN_FLAGS -I ${LLVM_MAIN_SRC_DIR}/lib/Target) diff --git a/llvm/lib/Target/Hexagon/AsmParser/CMakeLists.txt b/llvm/lib/Target/Hexagon/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/Hexagon/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/Hexagon/AsmParser/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + HexagonDesc + HexagonInfo + MC + MCParser + Support + ) + include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) add_llvm_library(LLVMHexagonAsmParser diff --git a/llvm/lib/Target/Hexagon/CMakeLists.txt b/llvm/lib/Target/Hexagon/CMakeLists.txt --- a/llvm/lib/Target/Hexagon/CMakeLists.txt +++ b/llvm/lib/Target/Hexagon/CMakeLists.txt @@ -1,3 +1,20 @@ +set(LLVM_LINK_COMPONENTS + Analysis + AsmPrinter + CodeGen + Core + HexagonAsmParser + HexagonDesc + HexagonInfo + IPO + MC + Scalar + SelectionDAG + Support + Target + TransformUtils + ) + set(LLVM_TARGET_DEFINITIONS Hexagon.td) tablegen(LLVM HexagonGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/Hexagon/Disassembler/CMakeLists.txt b/llvm/lib/Target/Hexagon/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/Hexagon/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/Hexagon/Disassembler/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + HexagonDesc + HexagonInfo + MC + MCDisassembler + Support + ) + add_llvm_library(LLVMHexagonDisassembler HexagonDisassembler.cpp ) diff --git a/llvm/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + HexagonInfo + MC + Support + ) + add_llvm_library(LLVMHexagonDesc HexagonAsmBackend.cpp HexagonELFObjectWriter.cpp diff --git a/llvm/lib/Target/Hexagon/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Hexagon/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/Hexagon/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/Hexagon/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMHexagonInfo HexagonTargetInfo.cpp ) diff --git a/llvm/lib/Target/Lanai/AsmParser/CMakeLists.txt b/llvm/lib/Target/Lanai/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/Lanai/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/Lanai/AsmParser/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + LanaiDesc + LanaiInfo + MC + MCParser + Support + ) + include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) add_llvm_library(LLVMLanaiAsmParser diff --git a/llvm/lib/Target/Lanai/CMakeLists.txt b/llvm/lib/Target/Lanai/CMakeLists.txt --- a/llvm/lib/Target/Lanai/CMakeLists.txt +++ b/llvm/lib/Target/Lanai/CMakeLists.txt @@ -1,3 +1,18 @@ +set(LLVM_LINK_COMPONENTS + Analysis + AsmPrinter + CodeGen + Core + LanaiAsmParser + LanaiDesc + LanaiInfo + MC + SelectionDAG + Support + Target + TransformUtils + ) + set(LLVM_TARGET_DEFINITIONS Lanai.td) tablegen(LLVM LanaiGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/Lanai/Disassembler/CMakeLists.txt b/llvm/lib/Target/Lanai/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/Lanai/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/Lanai/Disassembler/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + LanaiDesc + LanaiInfo + MC + MCDisassembler + Support + ) + add_llvm_library(LLVMLanaiDisassembler LanaiDisassembler.cpp ) diff --git a/llvm/lib/Target/Lanai/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Lanai/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/Lanai/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/Lanai/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + LanaiInfo + MC + MCDisassembler + Support + ) + add_llvm_library(LLVMLanaiDesc LanaiAsmBackend.cpp LanaiELFObjectWriter.cpp diff --git a/llvm/lib/Target/Lanai/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Lanai/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/Lanai/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/Lanai/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMLanaiInfo LanaiTargetInfo.cpp ) diff --git a/llvm/lib/Target/MSP430/AsmParser/CMakeLists.txt b/llvm/lib/Target/MSP430/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/MSP430/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/MSP430/AsmParser/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + MC + MCParser + MSP430Desc + MSP430Info + Support + ) + add_llvm_library(LLVMMSP430AsmParser MSP430AsmParser.cpp ) diff --git a/llvm/lib/Target/MSP430/CMakeLists.txt b/llvm/lib/Target/MSP430/CMakeLists.txt --- a/llvm/lib/Target/MSP430/CMakeLists.txt +++ b/llvm/lib/Target/MSP430/CMakeLists.txt @@ -1,3 +1,15 @@ +set(LLVM_LINK_COMPONENTS + AsmPrinter + CodeGen + Core + MC + MSP430Desc + MSP430Info + SelectionDAG + Support + Target + ) + set(LLVM_TARGET_DEFINITIONS MSP430.td) tablegen(LLVM MSP430GenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/MSP430/Disassembler/CMakeLists.txt b/llvm/lib/Target/MSP430/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/MSP430/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/MSP430/Disassembler/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MCDisassembler + MSP430Info + Support + ) + add_llvm_library(LLVMMSP430Disassembler MSP430Disassembler.cpp ) diff --git a/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MC + MSP430Info + Support + ) + add_llvm_library(LLVMMSP430Desc MSP430AsmBackend.cpp MSP430ELFObjectWriter.cpp diff --git a/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt b/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMMSP430Info MSP430TargetInfo.cpp ) diff --git a/llvm/lib/Target/Mips/AsmParser/CMakeLists.txt b/llvm/lib/Target/Mips/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/Mips/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/Mips/AsmParser/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + MC + MCParser + MipsDesc + MipsInfo + Support + ) + add_llvm_library(LLVMMipsAsmParser MipsAsmParser.cpp ) diff --git a/llvm/lib/Target/Mips/CMakeLists.txt b/llvm/lib/Target/Mips/CMakeLists.txt --- a/llvm/lib/Target/Mips/CMakeLists.txt +++ b/llvm/lib/Target/Mips/CMakeLists.txt @@ -1,3 +1,17 @@ +set(LLVM_LINK_COMPONENTS + Analysis + AsmPrinter + CodeGen + Core + GlobalISel + MC + MipsDesc + MipsInfo + SelectionDAG + Support + Target + ) + set(LLVM_TARGET_DEFINITIONS Mips.td) tablegen(LLVM MipsGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/Mips/Disassembler/CMakeLists.txt b/llvm/lib/Target/Mips/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/Mips/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/Mips/Disassembler/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MCDisassembler + MipsInfo + Support + ) + add_llvm_library(LLVMMipsDisassembler MipsDisassembler.cpp ) diff --git a/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MC + MipsInfo + Support + ) + add_llvm_library(LLVMMipsDesc MipsABIInfo.cpp MipsABIFlagsSection.cpp diff --git a/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMMipsInfo MipsTargetInfo.cpp ) diff --git a/llvm/lib/Target/NVPTX/CMakeLists.txt b/llvm/lib/Target/NVPTX/CMakeLists.txt --- a/llvm/lib/Target/NVPTX/CMakeLists.txt +++ b/llvm/lib/Target/NVPTX/CMakeLists.txt @@ -1,3 +1,20 @@ +set(LLVM_LINK_COMPONENTS + Analysis + AsmPrinter + CodeGen + Core + IPO + MC + NVPTXDesc + NVPTXInfo + Scalar + SelectionDAG + Support + Target + TransformUtils + Vectorize + ) + set(LLVM_TARGET_DEFINITIONS NVPTX.td) tablegen(LLVM NVPTXGenAsmWriter.inc -gen-asm-writer) diff --git a/llvm/lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MC + NVPTXInfo + Support + ) + add_llvm_library(LLVMNVPTXDesc NVPTXInstPrinter.cpp NVPTXMCAsmInfo.cpp diff --git a/llvm/lib/Target/NVPTX/TargetInfo/CMakeLists.txt b/llvm/lib/Target/NVPTX/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/NVPTX/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/NVPTX/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMNVPTXInfo NVPTXTargetInfo.cpp ) diff --git a/llvm/lib/Target/PowerPC/AsmParser/CMakeLists.txt b/llvm/lib/Target/PowerPC/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/PowerPC/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/PowerPC/AsmParser/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + MC + MCParser + PowerPCDesc + PowerPCInfo + Support + ) + add_llvm_library(LLVMPowerPCAsmParser PPCAsmParser.cpp ) diff --git a/llvm/lib/Target/PowerPC/CMakeLists.txt b/llvm/lib/Target/PowerPC/CMakeLists.txt --- a/llvm/lib/Target/PowerPC/CMakeLists.txt +++ b/llvm/lib/Target/PowerPC/CMakeLists.txt @@ -1,3 +1,18 @@ +set(LLVM_LINK_COMPONENTS + Analysis + AsmPrinter + CodeGen + Core + MC + PowerPCDesc + PowerPCInfo + Scalar + SelectionDAG + Support + Target + TransformUtils + ) + set(LLVM_TARGET_DEFINITIONS PPC.td) tablegen(LLVM PPCGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/PowerPC/Disassembler/CMakeLists.txt b/llvm/lib/Target/PowerPC/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/PowerPC/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/PowerPC/Disassembler/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MCDisassembler + PowerPCInfo + Support + ) + add_llvm_library(LLVMPowerPCDisassembler PPCDisassembler.cpp ) diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MC + PowerPCInfo + Support + ) + add_llvm_library(LLVMPowerPCDesc PPCAsmBackend.cpp PPCInstPrinter.cpp diff --git a/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt b/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMPowerPCInfo PowerPCTargetInfo.cpp ) diff --git a/llvm/lib/Target/RISCV/AsmParser/CMakeLists.txt b/llvm/lib/Target/RISCV/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/RISCV/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/RISCV/AsmParser/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + MC + MCParser + RISCVDesc + RISCVInfo + RISCVUtils + Support + ) + add_llvm_library(LLVMRISCVAsmParser RISCVAsmParser.cpp ) diff --git a/llvm/lib/Target/RISCV/CMakeLists.txt b/llvm/lib/Target/RISCV/CMakeLists.txt --- a/llvm/lib/Target/RISCV/CMakeLists.txt +++ b/llvm/lib/Target/RISCV/CMakeLists.txt @@ -1,3 +1,17 @@ +set(LLVM_LINK_COMPONENTS + Analysis + AsmPrinter + CodeGen + Core + MC + RISCVDesc + RISCVInfo + RISCVUtils + SelectionDAG + Support + Target + ) + set(LLVM_TARGET_DEFINITIONS RISCV.td) tablegen(LLVM RISCVGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/RISCV/Disassembler/CMakeLists.txt b/llvm/lib/Target/RISCV/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/RISCV/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/RISCV/Disassembler/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MCDisassembler + RISCVInfo + Support + ) + add_llvm_library(LLVMRISCVDisassembler RISCVDisassembler.cpp ) diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + MC + RISCVInfo + RISCVUtils + Support + ) + add_llvm_library(LLVMRISCVDesc RISCVAsmBackend.cpp RISCVELFObjectWriter.cpp diff --git a/llvm/lib/Target/RISCV/TargetInfo/CMakeLists.txt b/llvm/lib/Target/RISCV/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/RISCV/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/RISCV/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMRISCVInfo RISCVTargetInfo.cpp ) diff --git a/llvm/lib/Target/RISCV/Utils/CMakeLists.txt b/llvm/lib/Target/RISCV/Utils/CMakeLists.txt --- a/llvm/lib/Target/RISCV/Utils/CMakeLists.txt +++ b/llvm/lib/Target/RISCV/Utils/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMRISCVUtils RISCVBaseInfo.cpp RISCVMatInt.cpp diff --git a/llvm/lib/Target/Sparc/AsmParser/CMakeLists.txt b/llvm/lib/Target/Sparc/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/Sparc/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/Sparc/AsmParser/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + MC + MCParser + SparcDesc + SparcInfo + Support + ) + add_llvm_library(LLVMSparcAsmParser SparcAsmParser.cpp ) diff --git a/llvm/lib/Target/Sparc/CMakeLists.txt b/llvm/lib/Target/Sparc/CMakeLists.txt --- a/llvm/lib/Target/Sparc/CMakeLists.txt +++ b/llvm/lib/Target/Sparc/CMakeLists.txt @@ -1,3 +1,15 @@ +set(LLVM_LINK_COMPONENTS + AsmPrinter + CodeGen + Core + MC + SelectionDAG + SparcDesc + SparcInfo + Support + Target + ) + set(LLVM_TARGET_DEFINITIONS Sparc.td) tablegen(LLVM SparcGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/Sparc/Disassembler/CMakeLists.txt b/llvm/lib/Target/Sparc/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/Sparc/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/Sparc/Disassembler/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MCDisassembler + SparcInfo + Support + ) + add_llvm_library(LLVMSparcDisassembler SparcDisassembler.cpp ) diff --git a/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MC + SparcInfo + Support + ) + add_llvm_library(LLVMSparcDesc SparcAsmBackend.cpp SparcELFObjectWriter.cpp diff --git a/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMSparcInfo SparcTargetInfo.cpp ) diff --git a/llvm/lib/Target/SystemZ/AsmParser/CMakeLists.txt b/llvm/lib/Target/SystemZ/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/SystemZ/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/SystemZ/AsmParser/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + MC + MCParser + Support + SystemZDesc + SystemZInfo + ) + add_llvm_library(LLVMSystemZAsmParser SystemZAsmParser.cpp ) diff --git a/llvm/lib/Target/SystemZ/CMakeLists.txt b/llvm/lib/Target/SystemZ/CMakeLists.txt --- a/llvm/lib/Target/SystemZ/CMakeLists.txt +++ b/llvm/lib/Target/SystemZ/CMakeLists.txt @@ -1,3 +1,17 @@ +set(LLVM_LINK_COMPONENTS + Analysis + AsmPrinter + CodeGen + Core + MC + Scalar + SelectionDAG + Support + SystemZDesc + SystemZInfo + Target + ) + set(LLVM_TARGET_DEFINITIONS SystemZ.td) tablegen(LLVM SystemZGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/SystemZ/Disassembler/CMakeLists.txt b/llvm/lib/Target/SystemZ/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/SystemZ/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/SystemZ/Disassembler/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + MC + MCDisassembler + Support + SystemZDesc + SystemZInfo + ) + add_llvm_library(LLVMSystemZDisassembler SystemZDisassembler.cpp ) diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MC + Support + SystemZInfo + ) + add_llvm_library(LLVMSystemZDesc SystemZInstPrinter.cpp SystemZMCAsmBackend.cpp diff --git a/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt b/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMSystemZInfo SystemZTargetInfo.cpp ) diff --git a/llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt b/llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + MC + MCParser + Support + WebAssemblyInfo + ) + add_llvm_library(LLVMWebAssemblyAsmParser WebAssemblyAsmParser.cpp ) diff --git a/llvm/lib/Target/WebAssembly/CMakeLists.txt b/llvm/lib/Target/WebAssembly/CMakeLists.txt --- a/llvm/lib/Target/WebAssembly/CMakeLists.txt +++ b/llvm/lib/Target/WebAssembly/CMakeLists.txt @@ -1,3 +1,19 @@ +set(LLVM_LINK_COMPONENTS + Analysis + AsmPrinter + BinaryFormat + CodeGen + Core + MC + Scalar + SelectionDAG + Support + Target + TransformUtils + WebAssemblyDesc + WebAssemblyInfo + ) + set(LLVM_TARGET_DEFINITIONS WebAssembly.td) tablegen(LLVM WebAssemblyGenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt b/llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + MCDisassembler + Support + WebAssemblyDesc + WebAssemblyInfo + ) + add_llvm_library(LLVMWebAssemblyDisassembler WebAssemblyDisassembler.cpp ) diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MC + Support + WebAssemblyInfo + ) + add_llvm_library(LLVMWebAssemblyDesc WebAssemblyAsmBackend.cpp WebAssemblyInstPrinter.cpp diff --git a/llvm/lib/Target/WebAssembly/TargetInfo/CMakeLists.txt b/llvm/lib/Target/WebAssembly/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/WebAssembly/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/WebAssembly/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) add_llvm_library(LLVMWebAssemblyInfo diff --git a/llvm/lib/Target/X86/AsmParser/CMakeLists.txt b/llvm/lib/Target/X86/AsmParser/CMakeLists.txt --- a/llvm/lib/Target/X86/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/X86/AsmParser/CMakeLists.txt @@ -1,3 +1,11 @@ +set(LLVM_LINK_COMPONENTS + MC + MCParser + Support + X86Desc + X86Info + ) + add_llvm_library(LLVMX86AsmParser X86AsmParser.cpp ) diff --git a/llvm/lib/Target/X86/CMakeLists.txt b/llvm/lib/Target/X86/CMakeLists.txt --- a/llvm/lib/Target/X86/CMakeLists.txt +++ b/llvm/lib/Target/X86/CMakeLists.txt @@ -1,3 +1,19 @@ +set(LLVM_LINK_COMPONENTS + Analysis + AsmPrinter + CodeGen + Core + GlobalISel + MC + ProfileData + SelectionDAG + Support + Target + X86Desc + X86Info + X86Utils + ) + set(LLVM_TARGET_DEFINITIONS X86.td) tablegen(LLVM X86GenAsmMatcher.inc -gen-asm-matcher) diff --git a/llvm/lib/Target/X86/Disassembler/CMakeLists.txt b/llvm/lib/Target/X86/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/X86/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/X86/Disassembler/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MCDisassembler + Support + X86Info + ) + add_llvm_library(LLVMX86Disassembler X86Disassembler.cpp X86DisassemblerDecoder.cpp diff --git a/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + MC + MCDisassembler + Object + Support + X86Info + X86Utils + ) + add_llvm_library(LLVMX86Desc X86ATTInstPrinter.cpp X86IntelInstPrinter.cpp diff --git a/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt b/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMX86Info X86TargetInfo.cpp ) diff --git a/llvm/lib/Target/X86/Utils/CMakeLists.txt b/llvm/lib/Target/X86/Utils/CMakeLists.txt --- a/llvm/lib/Target/X86/Utils/CMakeLists.txt +++ b/llvm/lib/Target/X86/Utils/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMX86Utils X86ShuffleDecode.cpp ) diff --git a/llvm/lib/Target/XCore/CMakeLists.txt b/llvm/lib/Target/XCore/CMakeLists.txt --- a/llvm/lib/Target/XCore/CMakeLists.txt +++ b/llvm/lib/Target/XCore/CMakeLists.txt @@ -1,3 +1,17 @@ +set(LLVM_LINK_COMPONENTS + Analysis + AsmPrinter + CodeGen + Core + MC + SelectionDAG + Support + Target + TransformUtils + XCoreDesc + XCoreInfo + ) + set(LLVM_TARGET_DEFINITIONS XCore.td) tablegen(LLVM XCoreGenAsmWriter.inc -gen-asm-writer) diff --git a/llvm/lib/Target/XCore/Disassembler/CMakeLists.txt b/llvm/lib/Target/XCore/Disassembler/CMakeLists.txt --- a/llvm/lib/Target/XCore/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/XCore/Disassembler/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MCDisassembler + Support + XCoreInfo + ) + add_llvm_library(LLVMXCoreDisassembler XCoreDisassembler.cpp ) diff --git a/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt --- a/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + MC + Support + XCoreInfo + ) + add_llvm_library(LLVMXCoreDesc XCoreInstPrinter.cpp XCoreMCTargetDesc.cpp diff --git a/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt b/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt --- a/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMXCoreInfo XCoreTargetInfo.cpp ) diff --git a/llvm/lib/Testing/Support/CMakeLists.txt b/llvm/lib/Testing/Support/CMakeLists.txt --- a/llvm/lib/Testing/Support/CMakeLists.txt +++ b/llvm/lib/Testing/Support/CMakeLists.txt @@ -1,6 +1,10 @@ add_definitions(-DGTEST_LANG_CXX11=1) add_definitions(-DGTEST_HAS_TR1_TUPLE=0) +set(LLVM_LINK_COMPONENTS + Support + ) + add_llvm_library(LLVMTestingSupport Annotations.cpp Error.cpp @@ -10,9 +14,6 @@ ADDITIONAL_HEADER_DIRS ${LLVM_MAIN_INCLUDE_DIR}/llvm/Testing/Support - - LINK_COMPONENTS - Support ) include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include) diff --git a/llvm/lib/TextAPI/CMakeLists.txt b/llvm/lib/TextAPI/CMakeLists.txt --- a/llvm/lib/TextAPI/CMakeLists.txt +++ b/llvm/lib/TextAPI/CMakeLists.txt @@ -1,3 +1,8 @@ +set(LLVM_LINK_COMPONENTS + BinaryFormat + Support + ) + add_llvm_library(LLVMTextAPI ELF/ELFStub.cpp ELF/TBEHandler.cpp diff --git a/llvm/lib/ToolDrivers/llvm-dlltool/CMakeLists.txt b/llvm/lib/ToolDrivers/llvm-dlltool/CMakeLists.txt --- a/llvm/lib/ToolDrivers/llvm-dlltool/CMakeLists.txt +++ b/llvm/lib/ToolDrivers/llvm-dlltool/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + Object + Option + Support + ) + set(LLVM_TARGET_DEFINITIONS Options.td) tablegen(LLVM Options.inc -gen-opt-parser-defs) add_public_tablegen_target(DllOptionsTableGen) diff --git a/llvm/lib/Transforms/AggressiveInstCombine/CMakeLists.txt b/llvm/lib/Transforms/AggressiveInstCombine/CMakeLists.txt --- a/llvm/lib/Transforms/AggressiveInstCombine/CMakeLists.txt +++ b/llvm/lib/Transforms/AggressiveInstCombine/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + Analysis + Core + Support + TransformUtils + ) + add_llvm_library(LLVMAggressiveInstCombine AggressiveInstCombine.cpp TruncInstCombine.cpp diff --git a/llvm/lib/Transforms/Coroutines/CMakeLists.txt b/llvm/lib/Transforms/Coroutines/CMakeLists.txt --- a/llvm/lib/Transforms/Coroutines/CMakeLists.txt +++ b/llvm/lib/Transforms/Coroutines/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + Analysis + Core + IPO + Scalar + Support + TransformUtils + ) + add_llvm_library(LLVMCoroutines Coroutines.cpp CoroCleanup.cpp diff --git a/llvm/lib/Transforms/IPO/CMakeLists.txt b/llvm/lib/Transforms/IPO/CMakeLists.txt --- a/llvm/lib/Transforms/IPO/CMakeLists.txt +++ b/llvm/lib/Transforms/IPO/CMakeLists.txt @@ -1,3 +1,21 @@ +set(LLVM_LINK_COMPONENTS + AggressiveInstCombine + Analysis + BitReader + BitWriter + Core + IRReader + InstCombine + Instrumentation + Linker + Object + ProfileData + Scalar + Support + TransformUtils + Vectorize + ) + add_llvm_library(LLVMipo AlwaysInliner.cpp ArgumentPromotion.cpp diff --git a/llvm/lib/Transforms/InstCombine/CMakeLists.txt b/llvm/lib/Transforms/InstCombine/CMakeLists.txt --- a/llvm/lib/Transforms/InstCombine/CMakeLists.txt +++ b/llvm/lib/Transforms/InstCombine/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + Analysis + Core + Support + TransformUtils + ) + set(LLVM_TARGET_DEFINITIONS InstCombineTables.td) tablegen(LLVM InstCombineTables.inc -gen-searchable-tables) add_public_tablegen_target(InstCombineTableGen) diff --git a/llvm/lib/Transforms/Instrumentation/CMakeLists.txt b/llvm/lib/Transforms/Instrumentation/CMakeLists.txt --- a/llvm/lib/Transforms/Instrumentation/CMakeLists.txt +++ b/llvm/lib/Transforms/Instrumentation/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + Analysis + Core + MC + ProfileData + Support + TransformUtils + ) + add_llvm_library(LLVMInstrumentation AddressSanitizer.cpp BoundsChecking.cpp diff --git a/llvm/lib/Transforms/ObjCARC/CMakeLists.txt b/llvm/lib/Transforms/ObjCARC/CMakeLists.txt --- a/llvm/lib/Transforms/ObjCARC/CMakeLists.txt +++ b/llvm/lib/Transforms/ObjCARC/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + Analysis + Core + Support + TransformUtils + ) + add_llvm_library(LLVMObjCARCOpts ObjCARC.cpp ObjCARCOpts.cpp diff --git a/llvm/lib/Transforms/Scalar/CMakeLists.txt b/llvm/lib/Transforms/Scalar/CMakeLists.txt --- a/llvm/lib/Transforms/Scalar/CMakeLists.txt +++ b/llvm/lib/Transforms/Scalar/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLVM_LINK_COMPONENTS + AggressiveInstCombine + Analysis + Core + InstCombine + Support + TransformUtils + ) + add_llvm_library(LLVMScalarOpts ADCE.cpp AlignmentFromAssumptions.cpp diff --git a/llvm/lib/Transforms/Utils/CMakeLists.txt b/llvm/lib/Transforms/Utils/CMakeLists.txt --- a/llvm/lib/Transforms/Utils/CMakeLists.txt +++ b/llvm/lib/Transforms/Utils/CMakeLists.txt @@ -1,3 +1,9 @@ +set(LLVM_LINK_COMPONENTS + Analysis + Core + Support + ) + add_llvm_library(LLVMTransformUtils ASanStackFrameLayout.cpp AddDiscriminators.cpp diff --git a/llvm/lib/Transforms/Vectorize/CMakeLists.txt b/llvm/lib/Transforms/Vectorize/CMakeLists.txt --- a/llvm/lib/Transforms/Vectorize/CMakeLists.txt +++ b/llvm/lib/Transforms/Vectorize/CMakeLists.txt @@ -1,3 +1,10 @@ +set(LLVM_LINK_COMPONENTS + Analysis + Core + Support + TransformUtils + ) + add_llvm_library(LLVMVectorize LoadStoreVectorizer.cpp LoopVectorizationLegality.cpp diff --git a/llvm/lib/WindowsManifest/CMakeLists.txt b/llvm/lib/WindowsManifest/CMakeLists.txt --- a/llvm/lib/WindowsManifest/CMakeLists.txt +++ b/llvm/lib/WindowsManifest/CMakeLists.txt @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + set(system_libs) if( CMAKE_HOST_UNIX ) if( LLVM_LIBXML2_ENABLED ) diff --git a/llvm/lib/XRay/CMakeLists.txt b/llvm/lib/XRay/CMakeLists.txt --- a/llvm/lib/XRay/CMakeLists.txt +++ b/llvm/lib/XRay/CMakeLists.txt @@ -1,3 +1,8 @@ +set(LLVM_LINK_COMPONENTS + Object + Support + ) + add_llvm_library(LLVMXRay BlockIndexer.cpp BlockPrinter.cpp diff --git a/llvm/utils/llvm-build/llvmlinkcomps.py b/llvm/utils/llvm-build/llvmlinkcomps.py new file mode 100644 --- /dev/null +++ b/llvm/utils/llvm-build/llvmlinkcomps.py @@ -0,0 +1,32 @@ +from llvmbuild.main import LLVMProjectInfo +from os import pardir, path + +root = path.abspath(path.join(path.dirname(__file__), pardir, pardir)) +proj = LLVMProjectInfo.load_from_path(root, root) + +for c in proj.component_infos: + if c.type_name == "TargetGroup" or not hasattr(c, "required_libraries"): + continue + cmakelists = path.join(root, c.subpath.lstrip("/"), "CMakeLists.txt") + cm = open(cmakelists).read() # Never fails. + + if "LINK_COMPONENTS" in cm: # Defer to existing specified deps. + continue + + print("Setting link comps for ", c.name, c.subpath) + + req, magic = [], [] + for r in c.required_libraries: + if r.lower() == "all-targets": + magic += ["AllTargetsAsmParsers", "AllTargetsCodeGens", + "AllTargetsDescs", "AllTargetsInfos"] + elif r.lower() in "native nativecodegen engine".split(): + magic.append(r) + else: + req.append(r) + + join = lambda ss: "".join("\n " + s for s in sorted(ss)) + linkcomps = "set(LLVM_LINK_COMPONENTS%s%s\n )\n" % (join(req), join(magic)) + open(cmakelists, "w").write(linkcomps + "\n" + cm) + + print("Wrote %r" % cmakelists)