Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -611,6 +611,9 @@ message(FATAL_ERROR "Python 2.7 or newer is required") endif() +if(WITHOUT_LLVMBUILD) + message(STATUS "Building without LLVMBuild!") +else() ###### # LLVMBuild Integration # @@ -668,6 +671,7 @@ # the dependencies so that CMake will reconfigure properly when the LLVMBuild # files change. include(${LLVMBUILDCMAKEFRAG}) +endif(WITHOUT_LLVMBUILD) ###### @@ -913,6 +917,13 @@ add_subdirectory(docs) endif() +if(WITHOUT_LLVMBUILD) + include(LLVMBuild) + get_property(llvm_libz GLOBAL PROPERTY LLVM_LIBS) + validate_component_deps("${llvm_libz}") + gen_libdep_inc("${llvm_libz}" "${LLVM_TARGETS_TO_BUILD}" "") +endif() + add_subdirectory(cmake/modules) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) Index: cmake/modules/AddLLVM.cmake =================================================================== --- cmake/modules/AddLLVM.cmake +++ cmake/modules/AddLLVM.cmake @@ -523,7 +523,7 @@ endif() if(ARG_STATIC) - set(libtype INTERFACE) + set(libtype PUBLIC) else() # We can use PRIVATE since SO knows its dependent libs. set(libtype PRIVATE) Index: cmake/modules/LLVM-Config.cmake =================================================================== --- cmake/modules/LLVM-Config.cmake +++ cmake/modules/LLVM-Config.cmake @@ -198,10 +198,15 @@ list(FIND capitalized_libs LLVM${capitalized} lib_idx) if( lib_idx LESS 0 ) # The component is unknown. Maybe is an omitted target? - is_llvm_target_library(${c} iltl_result) - if( NOT iltl_result ) - message(FATAL_ERROR "Library `${c}' not found in list of llvm libraries.") - endif() + if(WITHOUT_LLVMBUILD) + # Assume it's a valid component that is yet to be scanned. + list(APPEND expanded_components LLVM${c}) + else() + is_llvm_target_library(${c} iltl_result) + if( NOT iltl_result ) + message(FATAL_ERROR "Library `${c}' not found in list of llvm libraries.") + endif() + endif(WITHOUT_LLVMBUILD) else( lib_idx LESS 0 ) list(GET LLVM_AVAILABLE_LIBS ${lib_idx} canonical_lib) list(APPEND expanded_components ${canonical_lib}) Index: cmake/modules/LLVMBuild.cmake =================================================================== --- /dev/null +++ cmake/modules/LLVMBuild.cmake @@ -0,0 +1,164 @@ +# Ensure that each component: +# - has valid dependencies -- all deps should themselves be components, +# - do not self-depend. +# This is analogous to LLVMProjectInfo.validate_components in the old +# utils/llvm-build. +function(validate_component_deps components) + foreach(component ${components}) + get_target_property(cdeps ${component} LINK_LIBRARIES) + list(GET cdeps 0 first_dep) + if(NOT ${first_dep} STREQUAL "cdeps-NOTFOUND") + foreach(cdep ${cdeps}) + if("${cdep}" STREQUAL "${component}") + message(SEND_ERROR "${component} cannot depend on itself.") + elseif(cdep MATCHES "^LLVM") + list(FIND components ${cdep} idx) + if(${idx} EQUAL -1) + message(SEND_ERROR "${component} depends on ${cdep}, which cannot be found.") + endif() + endif("${cdep}" STREQUAL "${component}") + endforeach() + endif() + endforeach(component) +endfunction(validate_component_deps) + +# Generates LibraryDependencies.inc, needed by tools/llvm-config. +function(gen_libdep_inc components targets noninstalls) + # Handle actual libs and track leaf comps for the "all" pseudo + set(leaf_comps "${components}") + list(FILTER leaf_comps INCLUDE REGEX "^LLVM") + foreach(component ${components}) + if(component MATCHES "^LLVM") + get_target_property(cdeps ${component} LINK_LIBRARIES) + list(FILTER cdeps INCLUDE REGEX "^LLVM") + + set(cdepz "") + foreach(cdep ${cdeps}) + # leaf components are the ones that nobody else depends on. + list(REMOVE_ITEM leaf_comps "${cdep}") + lib_to_complower(cdep "${cdep}") + set(cdepz "${cdepz}" "${cdep}") + endforeach() + + lib_to_complower(complowered "${component}") + gen_libdep_entry(entry "${complowered}" "${component}" 1 "${cdepz}") + set(entries "${entries}" "${entry}") + endif(component MATCHES "^LLVM") + endforeach(component) + + # Handle targets, i.e., {"x86", nullptr, true, {...}}, also "all-targets" + set(all_targets_ "") + foreach(target ${targets}) + set(cdepz "") + # Lanai uses InstPrinter rather than AsmPrinter + foreach(targcomp AsmParser AsmPrinter CodeGen Desc Disassembler Info InstPrinter Utils) + list(FIND components "LLVM${target}${targcomp}" idx) + if(NOT ${idx} EQUAL -1) + list(REMOVE_ITEM leaf_comps "LLVM${target}${targcomp}") + string(TOLOWER "${target}${targcomp}" cdep) + set(cdepz "${cdepz}" "${cdep}") + endif() + endforeach() + string(TOLOWER "${target}" target) + # all-targets + set(all_targets_ "${all_targets_}" "${target}") + gen_libdep_entry(entry "${target}" "" 1 "${cdepz}") + set(entries "${entries}" "${entry}") + endforeach() + + # Handle "native," "nativecodegen," and "engine" pseudos + list(FIND targets "${LLVM_NATIVE_ARCH}" have_native_backend) + list(FIND LLVM_TARGETS_WITH_JIT "${LLVM_NATIVE_ARCH}" have_jit) + # ^ FIXME: leaky abstraction. + if(NOT have_native_backend EQUAL -1) + # native backend will be built + string(TOLOWER "${LLVM_NATIVE_ARCH}" native_) + gen_libdep_entry(entry "native" "" 1 "${native_}") + set(entries "${entries}" "${entry}") + gen_libdep_entry(entry "nativecodegen" "" 1 "${native_}codegen") + set(entries "${entries}" "${entry}") + if (NOT have_jit EQUAL -1) + gen_libdep_entry(entry "engine" "" 1 "mcjit;native") + set(entries "${entries}" "${entry}") + endif() + else() + gen_libdep_entry(entry "native" "" 1 "") + set(entries "${entries}" "${entry}") + gen_libdep_entry(entry "nativecodegen" "" 1 "") + set(entries "${entries}" "${entry}") + gen_libdep_entry(entry "engine" "" 1 interpreter) + set(entries "${entries}" "${entry}") + endif() + + # Handle "all" + set(cdepz "all-targets;nativecodegen;engine") + foreach(leaf ${leaf_comps}) + lib_to_complower(leaf "${leaf}") + set(cdepz "${cdepz}" "${leaf}") + endforeach() + gen_libdep_entry(entry "all" "" 1 "${cdepz}") + set(entries "${entries}" "${entry}") + + # Handle "all-targets" + gen_libdep_entry(entry "all-targets" "" 1 "${all_targets_}") + set(entries "${entries}" "${entry}") + + # TODO: handle non-build-tree comps, like gtest and gtest_main + + list(SORT entries) + join_list(LLVM_COMPONENTS ",\n" "${entries}") + list(LENGTH entries LLVM_COMPONENT_COUNT) + configure_file( + ${CMAKE_SOURCE_DIR}/tools/llvm-config/LibraryDependencies.inc.in + ${CMAKE_BINARY_DIR}/tools/llvm-config/LibraryDependencies.inc + @ONLY + ) +endfunction(gen_libdep_inc) + +# LLVMSomeLib => somelib +function(lib_to_complower rv libname) + string(REGEX REPLACE "^LLVM" "" libname "${libname}") + string(TOLOWER "${libname}" libname) + set(${rv} "${libname}" PARENT_SCOPE) +endfunction(lib_to_complower) + +function(gen_libdep_entry output name_ lib_ is_installed required_libs) + if(lib_ STREQUAL "") + set(lib_ "nullptr") + else() + set(lib_ "\"${lib_}\"") + endif() + + if(is_installed) + set(is_installed "true") + else() + set(is_installed "false") + endif() + + list(SORT required_libs) + join_quoted(reqs "${required_libs}") + + string(CONFIGURE "{\"@name_@\", @lib_@, @is_installed@, {@reqs@}}" retval @ONLY) + set(${output} "${retval}" PARENT_SCOPE) +endfunction(gen_libdep_entry) + +# this is cmake. +function(join_list rv delim list_) + foreach(j ${list_}) + string(CONFIGURE "@j@" jjj @ONLY) + set(rv_ "${rv_}${delim}${jjj}") + endforeach() + string(REGEX REPLACE "^${delim}" "" rv__ "${rv_}") + set(${rv} "${rv__}" PARENT_SCOPE) +endfunction(join_list) + +function(join_quoted rv list_) + foreach(j ${list_}) + string(CONFIGURE "@j@" jjj @ONLY ESCAPE_QUOTES) + set(rv_ "${rv_}, \"${jjj}\"") + endforeach() + string(REGEX REPLACE "^, " "" rv__ "${rv_}") + set(${rv} "${rv__}" PARENT_SCOPE) +endfunction(join_quoted) + +# vim: set syntax=cmake textwidth=0 tabstop=2 shiftwidth=2: Index: lib/Analysis/CMakeLists.txt =================================================================== --- lib/Analysis/CMakeLists.txt +++ lib/Analysis/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core Support ProfileData Object) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAnalysis AliasAnalysis.cpp AliasAnalysisEvaluator.cpp Index: lib/AsmParser/CMakeLists.txt =================================================================== --- lib/AsmParser/CMakeLists.txt +++ lib/AsmParser/CMakeLists.txt @@ -1,4 +1,7 @@ # AsmParser +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAsmParser LLLexer.cpp LLParser.cpp Index: lib/Bitcode/Reader/CMakeLists.txt =================================================================== --- lib/Bitcode/Reader/CMakeLists.txt +++ lib/Bitcode/Reader/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMBitReader BitReader.cpp BitcodeReader.cpp Index: lib/Bitcode/Writer/CMakeLists.txt =================================================================== --- lib/Bitcode/Writer/CMakeLists.txt +++ lib/Bitcode/Writer/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis Core Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMBitWriter BitWriter.cpp BitcodeWriter.cpp Index: lib/CodeGen/AsmPrinter/CMakeLists.txt =================================================================== --- lib/CodeGen/AsmPrinter/CMakeLists.txt +++ lib/CodeGen/AsmPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis CodeGen Core DebugInfoCodeView DebugInfoMSF MC MCParser Support Target TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAsmPrinter AddressPool.cpp ARMException.cpp Index: lib/CodeGen/CMakeLists.txt =================================================================== --- lib/CodeGen/CMakeLists.txt +++ lib/CodeGen/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis BitReader BitWriter Core Instrumentation MC ProfileData ScalarOpts Support Target TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMCodeGen AggressiveAntiDepBreaker.cpp AllocationOrder.cpp Index: lib/CodeGen/GlobalISel/CMakeLists.txt =================================================================== --- lib/CodeGen/GlobalISel/CMakeLists.txt +++ lib/CodeGen/GlobalISel/CMakeLists.txt @@ -26,6 +26,9 @@ # In LLVMBuild.txt files, it is not possible to mark a dependency to a # library as optional. So instead, generate an empty library if we did # not ask for it. +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis CodeGen Core MC Support Target TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMGlobalISel ${GLOBAL_ISEL_BUILD_FILES} GlobalISel.cpp Index: lib/CodeGen/MIRParser/CMakeLists.txt =================================================================== --- lib/CodeGen/MIRParser/CMakeLists.txt +++ lib/CodeGen/MIRParser/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AsmParser CodeGen Core MC Support Target) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMIRParser MILexer.cpp MIParser.cpp Index: lib/CodeGen/SelectionDAG/CMakeLists.txt =================================================================== --- lib/CodeGen/SelectionDAG/CMakeLists.txt +++ lib/CodeGen/SelectionDAG/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis CodeGen Core MC Support Target TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSelectionDAG DAGCombiner.cpp FastISel.cpp Index: lib/DebugInfo/CodeView/CMakeLists.txt =================================================================== --- lib/DebugInfo/CodeView/CMakeLists.txt +++ lib/DebugInfo/CodeView/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support DebugInfoMSF) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMDebugInfoCodeView CodeViewError.cpp CodeViewRecordIO.cpp Index: lib/DebugInfo/DWARF/CMakeLists.txt =================================================================== --- lib/DebugInfo/DWARF/CMakeLists.txt +++ lib/DebugInfo/DWARF/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Object Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMDebugInfoDWARF DWARFAbbreviationDeclaration.cpp DWARFAcceleratorTable.cpp Index: lib/DebugInfo/MSF/CMakeLists.txt =================================================================== --- lib/DebugInfo/MSF/CMakeLists.txt +++ lib/DebugInfo/MSF/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMDebugInfoMSF MappedBlockStream.cpp MSFBuilder.cpp Index: lib/DebugInfo/PDB/CMakeLists.txt =================================================================== --- lib/DebugInfo/PDB/CMakeLists.txt +++ lib/DebugInfo/PDB/CMakeLists.txt @@ -54,6 +54,9 @@ list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB/Raw") list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB") +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Object Support DebugInfoCodeView DebugInfoMSF) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMDebugInfoPDB GenericError.cpp IPDBSourceFile.cpp Index: lib/DebugInfo/Symbolize/CMakeLists.txt =================================================================== --- lib/DebugInfo/Symbolize/CMakeLists.txt +++ lib/DebugInfo/Symbolize/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS DebugInfoDWARF DebugInfoPDB Object Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSymbolize DIPrinter.cpp SymbolizableObjectFile.cpp Index: lib/ExecutionEngine/CMakeLists.txt =================================================================== --- lib/ExecutionEngine/CMakeLists.txt +++ lib/ExecutionEngine/CMakeLists.txt @@ -1,5 +1,8 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core MC Object RuntimeDyld Support Target) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMExecutionEngine ExecutionEngine.cpp ExecutionEngineBindings.cpp Index: lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt =================================================================== --- lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt +++ lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt @@ -7,6 +7,9 @@ set(LLVM_INTEL_JIT_LIBS ${PTHREAD_LIB} ${LLVM_INTEL_JIT_LIBS}) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS CodeGen Core DebugInfoDWARF Support Object ExecutionEngine) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMIntelJITEvents IntelJITEventListener.cpp jitprofiling.c Index: lib/ExecutionEngine/Interpreter/CMakeLists.txt =================================================================== --- lib/ExecutionEngine/Interpreter/CMakeLists.txt +++ lib/ExecutionEngine/Interpreter/CMakeLists.txt @@ -6,6 +6,9 @@ include_directories( ${FFI_INCLUDE_PATH} ) endif() +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS CodeGen Core ExecutionEngine Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMInterpreter Execution.cpp ExternalFunctions.cpp Index: lib/ExecutionEngine/MCJIT/CMakeLists.txt =================================================================== --- lib/ExecutionEngine/MCJIT/CMakeLists.txt +++ lib/ExecutionEngine/MCJIT/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core ExecutionEngine Object RuntimeDyld Support Target) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMCJIT MCJIT.cpp Index: lib/ExecutionEngine/OProfileJIT/CMakeLists.txt =================================================================== --- lib/ExecutionEngine/OProfileJIT/CMakeLists.txt +++ lib/ExecutionEngine/OProfileJIT/CMakeLists.txt @@ -1,6 +1,9 @@ include_directories( ${LLVM_OPROFILE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support Object ExecutionEngine) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMOProfileJIT OProfileJITEventListener.cpp OProfileWrapper.cpp Index: lib/ExecutionEngine/Orc/CMakeLists.txt =================================================================== --- lib/ExecutionEngine/Orc/CMakeLists.txt +++ lib/ExecutionEngine/Orc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core ExecutionEngine Object RuntimeDyld Support TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMOrcJIT ExecutionUtils.cpp IndirectionUtils.cpp Index: lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt =================================================================== --- lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt +++ lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Object Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMRuntimeDyld JITSymbol.cpp RTDyldMemoryManager.cpp Index: lib/IR/CMakeLists.txt =================================================================== --- lib/IR/CMakeLists.txt +++ lib/IR/CMakeLists.txt @@ -2,6 +2,9 @@ tablegen(LLVM AttributesCompatFunc.inc -gen-attrs) add_public_tablegen_target(AttributeCompatFuncTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMCore AsmWriter.cpp Attributes.cpp Index: lib/IRReader/CMakeLists.txt =================================================================== --- lib/IRReader/CMakeLists.txt +++ lib/IRReader/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AsmParser BitReader Core Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMIRReader IRReader.cpp Index: lib/LTO/CMakeLists.txt =================================================================== --- lib/LTO/CMakeLists.txt +++ lib/LTO/CMakeLists.txt @@ -47,6 +47,9 @@ endif() +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis BitReader BitWriter CodeGen Core IPO InstCombine Linker MC ObjCARCOpts Object Passes ScalarOpts Support Target TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMLTO Caching.cpp LTO.cpp Index: lib/LibDriver/CMakeLists.txt =================================================================== --- lib/LibDriver/CMakeLists.txt +++ lib/LibDriver/CMakeLists.txt @@ -2,6 +2,9 @@ tablegen(LLVM Options.inc -gen-opt-parser-defs) add_public_tablegen_target(LibOptionsTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Object Option Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMLibDriver LibDriver.cpp ) Index: lib/LineEditor/CMakeLists.txt =================================================================== --- lib/LineEditor/CMakeLists.txt +++ lib/LineEditor/CMakeLists.txt @@ -2,6 +2,9 @@ set(link_libs edit) endif() +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMLineEditor LineEditor.cpp @@ -9,6 +12,5 @@ ${LLVM_MAIN_INCLUDE_DIR}/llvm/LineEditor LINK_LIBS - LLVMSupport ${link_libs} ) Index: lib/Linker/CMakeLists.txt =================================================================== --- lib/Linker/CMakeLists.txt +++ lib/Linker/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core Support TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMLinker IRMover.cpp LinkModules.cpp Index: lib/MC/CMakeLists.txt =================================================================== --- lib/MC/CMakeLists.txt +++ lib/MC/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMC ConstantPools.cpp ELFObjectWriter.cpp Index: lib/MC/MCDisassembler/CMakeLists.txt =================================================================== --- lib/MC/MCDisassembler/CMakeLists.txt +++ lib/MC/MCDisassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMCDisassembler Disassembler.cpp MCDisassembler.cpp Index: lib/MC/MCParser/CMakeLists.txt =================================================================== --- lib/MC/MCParser/CMakeLists.txt +++ lib/MC/MCParser/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMCParser AsmLexer.cpp AsmParser.cpp Index: lib/Object/CMakeLists.txt =================================================================== --- lib/Object/CMakeLists.txt +++ lib/Object/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS BitReader Core MC MCParser Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMObject Archive.cpp ArchiveWriter.cpp Index: lib/ObjectYAML/CMakeLists.txt =================================================================== --- lib/ObjectYAML/CMakeLists.txt +++ lib/ObjectYAML/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMObjectYAML YAML.cpp COFFYAML.cpp Index: lib/Option/CMakeLists.txt =================================================================== --- lib/Option/CMakeLists.txt +++ lib/Option/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMOption Arg.cpp ArgList.cpp Index: lib/Passes/CMakeLists.txt =================================================================== --- lib/Passes/CMakeLists.txt +++ lib/Passes/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis CodeGen Core IPO InstCombine ScalarOpts Support TransformUtils Vectorize Instrumentation) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMPasses PassBuilder.cpp Index: lib/ProfileData/CMakeLists.txt =================================================================== --- lib/ProfileData/CMakeLists.txt +++ lib/ProfileData/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMProfileData InstrProf.cpp InstrProfReader.cpp Index: lib/ProfileData/Coverage/CMakeLists.txt =================================================================== --- lib/ProfileData/Coverage/CMakeLists.txt +++ lib/ProfileData/Coverage/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core Object ProfileData Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMCoverage CoverageMapping.cpp CoverageMappingWriter.cpp Index: lib/Support/CMakeLists.txt =================================================================== --- lib/Support/CMakeLists.txt +++ lib/Support/CMakeLists.txt @@ -26,6 +26,9 @@ endif() endif( MSVC OR MINGW ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Demangle) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSupport APFloat.cpp APInt.cpp Index: lib/TableGen/CMakeLists.txt =================================================================== --- lib/TableGen/CMakeLists.txt +++ lib/TableGen/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMTableGen Error.cpp Main.cpp Index: lib/Target/AArch64/AsmParser/CMakeLists.txt =================================================================== --- lib/Target/AArch64/AsmParser/CMakeLists.txt +++ lib/Target/AArch64/AsmParser/CMakeLists.txt @@ -1,5 +1,8 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AArch64Desc AArch64Info AArch64Utils MC MCParser Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAArch64AsmParser AArch64AsmParser.cpp ) Index: lib/Target/AArch64/CMakeLists.txt =================================================================== --- lib/Target/AArch64/CMakeLists.txt +++ lib/Target/AArch64/CMakeLists.txt @@ -35,7 +35,9 @@ set(LLVM_OPTIONAL_SOURCES LLVMGlobalISel ${GLOBAL_ISEL_FILES}) endif() - +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AArch64AsmPrinter AArch64Desc AArch64Info AArch64Utils Analysis AsmPrinter CodeGen Core MC ScalarOpts SelectionDAG Support Target GlobalISel) +endif(WITHOUT_LLVMBUILD) add_llvm_target(AArch64CodeGen AArch64A57FPLoadBalancing.cpp AArch64AddressTypePromotion.cpp Index: lib/Target/AArch64/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/AArch64/Disassembler/CMakeLists.txt +++ lib/Target/AArch64/Disassembler/CMakeLists.txt @@ -1,5 +1,8 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AArch64Desc AArch64Info AArch64Utils MC MCDisassembler Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAArch64Disassembler AArch64Disassembler.cpp AArch64ExternalSymbolizer.cpp Index: lib/Target/AArch64/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/AArch64/InstPrinter/CMakeLists.txt +++ lib/Target/AArch64/InstPrinter/CMakeLists.txt @@ -1,5 +1,8 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AArch64Utils MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAArch64AsmPrinter AArch64InstPrinter.cpp ) Index: lib/Target/AArch64/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/AArch64/MCTargetDesc/CMakeLists.txt +++ lib/Target/AArch64/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AArch64AsmPrinter AArch64Info MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAArch64Desc AArch64AsmBackend.cpp AArch64ELFObjectWriter.cpp Index: lib/Target/AArch64/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/AArch64/TargetInfo/CMakeLists.txt +++ lib/Target/AArch64/TargetInfo/CMakeLists.txt @@ -1,5 +1,8 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAArch64Info AArch64TargetInfo.cpp ) Index: lib/Target/AArch64/Utils/CMakeLists.txt =================================================================== --- lib/Target/AArch64/Utils/CMakeLists.txt +++ lib/Target/AArch64/Utils/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAArch64Utils AArch64BaseInfo.cpp ) Index: lib/Target/AMDGPU/AsmParser/CMakeLists.txt =================================================================== --- lib/Target/AMDGPU/AsmParser/CMakeLists.txt +++ lib/Target/AMDGPU/AsmParser/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MCParser AMDGPUDesc AMDGPUInfo AMDGPUUtils Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAMDGPUAsmParser AMDGPUAsmParser.cpp ) Index: lib/Target/AMDGPU/CMakeLists.txt =================================================================== --- lib/Target/AMDGPU/CMakeLists.txt +++ lib/Target/AMDGPU/CMakeLists.txt @@ -28,6 +28,9 @@ endif() +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis AsmPrinter CodeGen Core IPO MC AMDGPUAsmPrinter AMDGPUDesc AMDGPUInfo AMDGPUUtils ScalarOpts SelectionDAG Support Target TransformUtils Vectorize) +endif(WITHOUT_LLVMBUILD) add_llvm_target(AMDGPUCodeGen AMDILCFGStructurizer.cpp AMDGPUAlwaysInlinePass.cpp Index: lib/Target/AMDGPU/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/AMDGPU/Disassembler/CMakeLists.txt +++ lib/Target/AMDGPU/Disassembler/CMakeLists.txt @@ -1,5 +1,8 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AMDGPUDesc AMDGPUInfo AMDGPUUtils MC MCDisassembler Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAMDGPUDisassembler AMDGPUDisassembler.cpp ) Index: lib/Target/AMDGPU/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/AMDGPU/InstPrinter/CMakeLists.txt +++ lib/Target/AMDGPU/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support AMDGPUUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAMDGPUAsmPrinter AMDGPUInstPrinter.cpp ) Index: lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt +++ lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt @@ -1,4 +1,7 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core MC AMDGPUAsmPrinter AMDGPUInfo AMDGPUUtils Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAMDGPUDesc AMDGPUAsmBackend.cpp AMDGPUELFObjectWriter.cpp Index: lib/Target/AMDGPU/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/AMDGPU/TargetInfo/CMakeLists.txt +++ lib/Target/AMDGPU/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAMDGPUInfo AMDGPUTargetInfo.cpp ) Index: lib/Target/AMDGPU/Utils/CMakeLists.txt =================================================================== --- lib/Target/AMDGPU/Utils/CMakeLists.txt +++ lib/Target/AMDGPU/Utils/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAMDGPUUtils AMDGPUBaseInfo.cpp AMDKernelCodeTUtils.cpp Index: lib/Target/ARM/AsmParser/CMakeLists.txt =================================================================== --- lib/Target/ARM/AsmParser/CMakeLists.txt +++ lib/Target/ARM/AsmParser/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS ARMDesc ARMInfo MC MCParser Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMARMAsmParser ARMAsmParser.cpp ) Index: lib/Target/ARM/CMakeLists.txt =================================================================== --- lib/Target/ARM/CMakeLists.txt +++ lib/Target/ARM/CMakeLists.txt @@ -28,6 +28,9 @@ set(LLVM_OPTIONAL_SOURCES LLVMGlobalISel ${GLOBAL_ISEL_FILES}) endif() +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS ARMAsmPrinter ARMDesc ARMInfo Analysis AsmPrinter CodeGen Core MC ScalarOpts SelectionDAG Support Target GlobalISel) +endif(WITHOUT_LLVMBUILD) add_llvm_target(ARMCodeGen A15SDOptimizer.cpp ARMAsmPrinter.cpp Index: lib/Target/ARM/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/ARM/Disassembler/CMakeLists.txt +++ lib/Target/ARM/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS ARMDesc ARMInfo MCDisassembler Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMARMDisassembler ARMDisassembler.cpp ) Index: lib/Target/ARM/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/ARM/InstPrinter/CMakeLists.txt +++ lib/Target/ARM/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMARMAsmPrinter ARMInstPrinter.cpp ) Index: lib/Target/ARM/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/ARM/MCTargetDesc/CMakeLists.txt +++ lib/Target/ARM/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS ARMAsmPrinter ARMInfo MC MCDisassembler Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMARMDesc ARMAsmBackend.cpp ARMELFObjectWriter.cpp Index: lib/Target/ARM/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/ARM/TargetInfo/CMakeLists.txt +++ lib/Target/ARM/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMARMInfo ARMTargetInfo.cpp ) Index: lib/Target/AVR/AsmParser/CMakeLists.txt =================================================================== --- lib/Target/AVR/AsmParser/CMakeLists.txt +++ lib/Target/AVR/AsmParser/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MCParser AVRDesc AVRInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAVRAsmParser AVRAsmParser.cpp ) Index: lib/Target/AVR/CMakeLists.txt =================================================================== --- lib/Target/AVR/CMakeLists.txt +++ lib/Target/AVR/CMakeLists.txt @@ -16,6 +16,9 @@ tablegen(LLVM AVRGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(AVRCommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AsmPrinter CodeGen Core MC AVRAsmPrinter AVRDesc AVRInfo SelectionDAG Support Target) +endif(WITHOUT_LLVMBUILD) add_llvm_target(AVRCodeGen AVRAsmPrinter.cpp AVRExpandPseudoInsts.cpp Index: lib/Target/AVR/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/AVR/Disassembler/CMakeLists.txt +++ lib/Target/AVR/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MCDisassembler AVRInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAVRDisassembler AVRDisassembler.cpp ) Index: lib/Target/AVR/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/AVR/InstPrinter/CMakeLists.txt +++ lib/Target/AVR/InstPrinter/CMakeLists.txt @@ -1,8 +1,11 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAVRAsmPrinter AVRInstPrinter.cpp ) add_dependencies(LLVMAVRAsmPrinter AVRCommonTableGen) \ No newline at end of file Index: lib/Target/AVR/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/AVR/MCTargetDesc/CMakeLists.txt +++ lib/Target/AVR/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC AVRAsmPrinter AVRInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAVRDesc AVRAsmBackend.cpp AVRELFObjectWriter.cpp Index: lib/Target/AVR/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/AVR/TargetInfo/CMakeLists.txt +++ lib/Target/AVR/TargetInfo/CMakeLists.txt @@ -1,6 +1,9 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMAVRInfo AVRTargetInfo.cpp ) Index: lib/Target/BPF/CMakeLists.txt =================================================================== --- lib/Target/BPF/CMakeLists.txt +++ lib/Target/BPF/CMakeLists.txt @@ -11,6 +11,9 @@ tablegen(LLVM BPFGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(BPFCommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AsmPrinter CodeGen Core MC BPFAsmPrinter BPFDesc BPFInfo SelectionDAG Support Target) +endif(WITHOUT_LLVMBUILD) add_llvm_target(BPFCodeGen BPFAsmPrinter.cpp BPFFrameLowering.cpp Index: lib/Target/BPF/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/BPF/Disassembler/CMakeLists.txt +++ lib/Target/BPF/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MCDisassembler BPFInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMBPFDisassembler BPFDisassembler.cpp ) Index: lib/Target/BPF/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/BPF/InstPrinter/CMakeLists.txt +++ lib/Target/BPF/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMBPFAsmPrinter BPFInstPrinter.cpp ) Index: lib/Target/BPF/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/BPF/MCTargetDesc/CMakeLists.txt +++ lib/Target/BPF/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC BPFAsmPrinter BPFInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMBPFDesc BPFMCTargetDesc.cpp BPFAsmBackend.cpp Index: lib/Target/BPF/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/BPF/TargetInfo/CMakeLists.txt +++ lib/Target/BPF/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMBPFInfo BPFTargetInfo.cpp ) Index: lib/Target/CMakeLists.txt =================================================================== --- lib/Target/CMakeLists.txt +++ lib/Target/CMakeLists.txt @@ -2,6 +2,9 @@ list(APPEND LLVM_TABLEGEN_FLAGS -I ${LLVM_MAIN_SRC_DIR}/lib/Target) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis Core MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMTarget Target.cpp TargetIntrinsicInfo.cpp Index: lib/Target/Hexagon/AsmParser/CMakeLists.txt =================================================================== --- lib/Target/Hexagon/AsmParser/CMakeLists.txt +++ lib/Target/Hexagon/AsmParser/CMakeLists.txt @@ -1,5 +1,8 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MCParser Support HexagonDesc HexagonInfo) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMHexagonAsmParser HexagonAsmParser.cpp ) Index: lib/Target/Hexagon/CMakeLists.txt =================================================================== --- lib/Target/Hexagon/CMakeLists.txt +++ lib/Target/Hexagon/CMakeLists.txt @@ -11,6 +11,9 @@ tablegen(LLVM HexagonGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(HexagonCommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis AsmPrinter CodeGen Core HexagonAsmParser HexagonDesc HexagonInfo MC ScalarOpts SelectionDAG Support Target TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_target(HexagonCodeGen BitTracker.cpp HexagonAsmPrinter.cpp Index: lib/Target/Hexagon/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/Hexagon/Disassembler/CMakeLists.txt +++ lib/Target/Hexagon/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS HexagonDesc HexagonInfo MC MCDisassembler Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMHexagonDisassembler HexagonDisassembler.cpp ) Index: lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt +++ lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS HexagonInfo MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMHexagonDesc HexagonAsmBackend.cpp HexagonELFObjectWriter.cpp Index: lib/Target/Hexagon/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/Hexagon/TargetInfo/CMakeLists.txt +++ lib/Target/Hexagon/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMHexagonInfo HexagonTargetInfo.cpp ) Index: lib/Target/Lanai/AsmParser/CMakeLists.txt =================================================================== --- lib/Target/Lanai/AsmParser/CMakeLists.txt +++ lib/Target/Lanai/AsmParser/CMakeLists.txt @@ -1,5 +1,8 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MCParser Support LanaiDesc LanaiInfo) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMLanaiAsmParser LanaiAsmParser.cpp ) Index: lib/Target/Lanai/CMakeLists.txt =================================================================== --- lib/Target/Lanai/CMakeLists.txt +++ lib/Target/Lanai/CMakeLists.txt @@ -11,6 +11,9 @@ tablegen(LLVM LanaiGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(LanaiCommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis AsmPrinter CodeGen Core LanaiAsmParser LanaiDesc LanaiInfo LanaiInstPrinter MC SelectionDAG Support Target TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_target(LanaiCodeGen LanaiAsmPrinter.cpp LanaiDelaySlotFiller.cpp Index: lib/Target/Lanai/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/Lanai/Disassembler/CMakeLists.txt +++ lib/Target/Lanai/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS LanaiDesc LanaiInfo MC MCDisassembler Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMLanaiDisassembler LanaiDisassembler.cpp ) Index: lib/Target/Lanai/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/Lanai/InstPrinter/CMakeLists.txt +++ lib/Target/Lanai/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS LanaiInfo MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMLanaiInstPrinter LanaiInstPrinter.cpp ) Index: lib/Target/Lanai/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/Lanai/MCTargetDesc/CMakeLists.txt +++ lib/Target/Lanai/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS LanaiInfo LanaiInstPrinter MC MCDisassembler Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMLanaiDesc LanaiAsmBackend.cpp LanaiELFObjectWriter.cpp Index: lib/Target/Lanai/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/Lanai/TargetInfo/CMakeLists.txt +++ lib/Target/Lanai/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMLanaiInfo LanaiTargetInfo.cpp ) Index: lib/Target/MSP430/CMakeLists.txt =================================================================== --- lib/Target/MSP430/CMakeLists.txt +++ lib/Target/MSP430/CMakeLists.txt @@ -8,6 +8,9 @@ tablegen(LLVM MSP430GenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(MSP430CommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AsmPrinter CodeGen Core MC MSP430AsmPrinter MSP430Desc MSP430Info SelectionDAG Support Target) +endif(WITHOUT_LLVMBUILD) add_llvm_target(MSP430CodeGen MSP430BranchSelector.cpp MSP430ISelDAGToDAG.cpp Index: lib/Target/MSP430/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/MSP430/InstPrinter/CMakeLists.txt +++ lib/Target/MSP430/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMSP430AsmPrinter MSP430InstPrinter.cpp ) Index: lib/Target/MSP430/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/MSP430/MCTargetDesc/CMakeLists.txt +++ lib/Target/MSP430/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MSP430AsmPrinter MSP430Info Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMSP430Desc MSP430MCTargetDesc.cpp MSP430MCAsmInfo.cpp Index: lib/Target/MSP430/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/MSP430/TargetInfo/CMakeLists.txt +++ lib/Target/MSP430/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMSP430Info MSP430TargetInfo.cpp ) Index: lib/Target/Mips/AsmParser/CMakeLists.txt =================================================================== --- lib/Target/Mips/AsmParser/CMakeLists.txt +++ lib/Target/Mips/AsmParser/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MCParser MipsDesc MipsInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMipsAsmParser MipsAsmParser.cpp ) Index: lib/Target/Mips/CMakeLists.txt =================================================================== --- lib/Target/Mips/CMakeLists.txt +++ lib/Target/Mips/CMakeLists.txt @@ -13,6 +13,9 @@ tablegen(LLVM MipsGenMCPseudoLowering.inc -gen-pseudo-lowering) add_public_tablegen_target(MipsCommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis AsmPrinter CodeGen Core MC MipsAsmPrinter MipsDesc MipsInfo SelectionDAG Support Target) +endif(WITHOUT_LLVMBUILD) add_llvm_target(MipsCodeGen Mips16FrameLowering.cpp Mips16HardFloat.cpp Index: lib/Target/Mips/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/Mips/Disassembler/CMakeLists.txt +++ lib/Target/Mips/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MCDisassembler MipsInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMipsDisassembler MipsDisassembler.cpp ) Index: lib/Target/Mips/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/Mips/InstPrinter/CMakeLists.txt +++ lib/Target/Mips/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMipsAsmPrinter MipsInstPrinter.cpp ) Index: lib/Target/Mips/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/Mips/MCTargetDesc/CMakeLists.txt +++ lib/Target/Mips/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MipsAsmPrinter MipsInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMipsDesc MipsABIInfo.cpp MipsABIFlagsSection.cpp Index: lib/Target/Mips/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/Mips/TargetInfo/CMakeLists.txt +++ lib/Target/Mips/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMMipsInfo MipsTargetInfo.cpp ) Index: lib/Target/NVPTX/CMakeLists.txt =================================================================== --- lib/Target/NVPTX/CMakeLists.txt +++ lib/Target/NVPTX/CMakeLists.txt @@ -35,6 +35,9 @@ NVVMReflect.cpp ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis AsmPrinter CodeGen Core MC NVPTXAsmPrinter NVPTXDesc NVPTXInfo ScalarOpts SelectionDAG Support Target TransformUtils Vectorize) +endif(WITHOUT_LLVMBUILD) add_llvm_target(NVPTXCodeGen ${NVPTXCodeGen_sources}) add_subdirectory(TargetInfo) Index: lib/Target/NVPTX/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/NVPTX/InstPrinter/CMakeLists.txt +++ lib/Target/NVPTX/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMNVPTXAsmPrinter NVPTXInstPrinter.cpp ) Index: lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt +++ lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC NVPTXAsmPrinter NVPTXInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMNVPTXDesc NVPTXMCAsmInfo.cpp NVPTXMCTargetDesc.cpp Index: lib/Target/NVPTX/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/NVPTX/TargetInfo/CMakeLists.txt +++ lib/Target/NVPTX/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMNVPTXInfo NVPTXTargetInfo.cpp ) Index: lib/Target/PowerPC/AsmParser/CMakeLists.txt =================================================================== --- lib/Target/PowerPC/AsmParser/CMakeLists.txt +++ lib/Target/PowerPC/AsmParser/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MCParser PowerPCDesc PowerPCInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMPowerPCAsmParser PPCAsmParser.cpp ) Index: lib/Target/PowerPC/CMakeLists.txt =================================================================== --- lib/Target/PowerPC/CMakeLists.txt +++ lib/Target/PowerPC/CMakeLists.txt @@ -12,6 +12,9 @@ tablegen(LLVM PPCGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(PowerPCCommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis AsmPrinter CodeGen Core MC PowerPCAsmPrinter PowerPCDesc PowerPCInfo ScalarOpts SelectionDAG Support Target TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_target(PowerPCCodeGen PPCBoolRetToInt.cpp PPCAsmPrinter.cpp Index: lib/Target/PowerPC/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/PowerPC/Disassembler/CMakeLists.txt +++ lib/Target/PowerPC/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MCDisassembler PowerPCInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMPowerPCDisassembler PPCDisassembler.cpp ) Index: lib/Target/PowerPC/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/PowerPC/InstPrinter/CMakeLists.txt +++ lib/Target/PowerPC/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMPowerPCAsmPrinter PPCInstPrinter.cpp ) Index: lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt +++ lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC PowerPCAsmPrinter PowerPCInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMPowerPCDesc PPCAsmBackend.cpp PPCMCTargetDesc.cpp Index: lib/Target/PowerPC/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/PowerPC/TargetInfo/CMakeLists.txt +++ lib/Target/PowerPC/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMPowerPCInfo PowerPCTargetInfo.cpp ) Index: lib/Target/RISCV/CMakeLists.txt =================================================================== --- lib/Target/RISCV/CMakeLists.txt +++ lib/Target/RISCV/CMakeLists.txt @@ -6,6 +6,9 @@ add_public_tablegen_target(RISCVCommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core CodeGen RISCVInfo Support Target) +endif(WITHOUT_LLVMBUILD) add_llvm_target(RISCVCodeGen RISCVTargetMachine.cpp ) Index: lib/Target/RISCV/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/RISCV/MCTargetDesc/CMakeLists.txt +++ lib/Target/RISCV/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC RISCVInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMRISCVDesc RISCVAsmBackend.cpp RISCVELFObjectWriter.cpp Index: lib/Target/RISCV/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/RISCV/TargetInfo/CMakeLists.txt +++ lib/Target/RISCV/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMRISCVInfo RISCVTargetInfo.cpp ) Index: lib/Target/Sparc/AsmParser/CMakeLists.txt =================================================================== --- lib/Target/Sparc/AsmParser/CMakeLists.txt +++ lib/Target/Sparc/AsmParser/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MCParser SparcDesc SparcInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSparcAsmParser SparcAsmParser.cpp ) Index: lib/Target/Sparc/CMakeLists.txt =================================================================== --- lib/Target/Sparc/CMakeLists.txt +++ lib/Target/Sparc/CMakeLists.txt @@ -11,6 +11,9 @@ tablegen(LLVM SparcGenCallingConv.inc -gen-callingconv) add_public_tablegen_target(SparcCommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS AsmPrinter CodeGen Core MC SelectionDAG SparcAsmPrinter SparcDesc SparcInfo Support Target) +endif(WITHOUT_LLVMBUILD) add_llvm_target(SparcCodeGen DelaySlotFiller.cpp LeonPasses.cpp Index: lib/Target/Sparc/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/Sparc/Disassembler/CMakeLists.txt +++ lib/Target/Sparc/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MCDisassembler SparcInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSparcDisassembler SparcDisassembler.cpp ) Index: lib/Target/Sparc/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/Sparc/InstPrinter/CMakeLists.txt +++ lib/Target/Sparc/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSparcAsmPrinter SparcInstPrinter.cpp ) Index: lib/Target/Sparc/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/Sparc/MCTargetDesc/CMakeLists.txt +++ lib/Target/Sparc/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC SparcAsmPrinter SparcInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSparcDesc SparcAsmBackend.cpp SparcELFObjectWriter.cpp Index: lib/Target/Sparc/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/Sparc/TargetInfo/CMakeLists.txt +++ lib/Target/Sparc/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSparcInfo SparcTargetInfo.cpp ) Index: lib/Target/SystemZ/AsmParser/CMakeLists.txt =================================================================== --- lib/Target/SystemZ/AsmParser/CMakeLists.txt +++ lib/Target/SystemZ/AsmParser/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MCParser Support SystemZDesc SystemZInfo) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSystemZAsmParser SystemZAsmParser.cpp ) Index: lib/Target/SystemZ/CMakeLists.txt =================================================================== --- lib/Target/SystemZ/CMakeLists.txt +++ lib/Target/SystemZ/CMakeLists.txt @@ -11,6 +11,9 @@ tablegen(LLVM SystemZGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(SystemZCommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis AsmPrinter CodeGen Core MC SelectionDAG Support SystemZAsmPrinter SystemZDesc SystemZInfo Target) +endif(WITHOUT_LLVMBUILD) add_llvm_target(SystemZCodeGen SystemZAsmPrinter.cpp SystemZCallingConv.cpp Index: lib/Target/SystemZ/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/SystemZ/Disassembler/CMakeLists.txt +++ lib/Target/SystemZ/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MCDisassembler Support SystemZDesc SystemZInfo) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSystemZDisassembler SystemZDisassembler.cpp ) Index: lib/Target/SystemZ/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/SystemZ/InstPrinter/CMakeLists.txt +++ lib/Target/SystemZ/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSystemZAsmPrinter SystemZInstPrinter.cpp ) Index: lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt +++ lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support SystemZAsmPrinter SystemZInfo) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSystemZDesc SystemZMCAsmBackend.cpp SystemZMCAsmInfo.cpp Index: lib/Target/SystemZ/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/SystemZ/TargetInfo/CMakeLists.txt +++ lib/Target/SystemZ/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMSystemZInfo SystemZTargetInfo.cpp ) Index: lib/Target/WebAssembly/CMakeLists.txt =================================================================== --- lib/Target/WebAssembly/CMakeLists.txt +++ lib/Target/WebAssembly/CMakeLists.txt @@ -9,6 +9,9 @@ tablegen(LLVM WebAssemblyGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(WebAssemblyCommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis AsmPrinter CodeGen Core MC ScalarOpts SelectionDAG Support Target TransformUtils WebAssemblyAsmPrinter WebAssemblyDesc WebAssemblyInfo) +endif(WITHOUT_LLVMBUILD) add_llvm_target(WebAssemblyCodeGen WebAssemblyArgumentMove.cpp WebAssemblyAsmPrinter.cpp Index: lib/Target/WebAssembly/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/WebAssembly/Disassembler/CMakeLists.txt +++ lib/Target/WebAssembly/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MCDisassembler WebAssemblyInfo Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMWebAssemblyDisassembler WebAssemblyDisassembler.cpp ) Index: lib/Target/WebAssembly/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/WebAssembly/InstPrinter/CMakeLists.txt +++ lib/Target/WebAssembly/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMWebAssemblyAsmPrinter WebAssemblyInstPrinter.cpp ) Index: lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt +++ lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support WebAssemblyAsmPrinter WebAssemblyInfo) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMWebAssemblyDesc WebAssemblyAsmBackend.cpp WebAssemblyELFObjectWriter.cpp Index: lib/Target/WebAssembly/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/WebAssembly/TargetInfo/CMakeLists.txt +++ lib/Target/WebAssembly/TargetInfo/CMakeLists.txt @@ -1,5 +1,8 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMWebAssemblyInfo WebAssemblyTargetInfo.cpp ) Index: lib/Target/X86/AsmParser/CMakeLists.txt =================================================================== --- lib/Target/X86/AsmParser/CMakeLists.txt +++ lib/Target/X86/AsmParser/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MCParser Support X86Desc X86Info) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMX86AsmParser X86AsmInstrumentation.cpp X86AsmParser.cpp Index: lib/Target/X86/CMakeLists.txt =================================================================== --- lib/Target/X86/CMakeLists.txt +++ lib/Target/X86/CMakeLists.txt @@ -59,6 +59,9 @@ ${GLOBAL_ISEL_BUILD_FILES} ) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis AsmPrinter CodeGen Core MC SelectionDAG Support Target X86AsmPrinter X86Desc X86Info X86Utils GlobalISel) +endif(WITHOUT_LLVMBUILD) add_llvm_target(X86CodeGen ${sources}) add_subdirectory(AsmParser) Index: lib/Target/X86/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/X86/Disassembler/CMakeLists.txt +++ lib/Target/X86/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MCDisassembler Support X86Info) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMX86Disassembler X86Disassembler.cpp X86DisassemblerDecoder.cpp Index: lib/Target/X86/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/X86/InstPrinter/CMakeLists.txt +++ lib/Target/X86/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support X86Utils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMX86AsmPrinter X86ATTInstPrinter.cpp X86IntelInstPrinter.cpp Index: lib/Target/X86/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/X86/MCTargetDesc/CMakeLists.txt +++ lib/Target/X86/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC MCDisassembler Object Support X86AsmPrinter X86Info) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMX86Desc X86AsmBackend.cpp X86MCTargetDesc.cpp Index: lib/Target/X86/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/X86/TargetInfo/CMakeLists.txt +++ lib/Target/X86/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMX86Info X86TargetInfo.cpp ) Index: lib/Target/X86/Utils/CMakeLists.txt =================================================================== --- lib/Target/X86/Utils/CMakeLists.txt +++ lib/Target/X86/Utils/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Core Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMX86Utils X86ShuffleDecode.cpp ) Index: lib/Target/XCore/CMakeLists.txt =================================================================== --- lib/Target/XCore/CMakeLists.txt +++ lib/Target/XCore/CMakeLists.txt @@ -9,6 +9,9 @@ tablegen(LLVM XCoreGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(XCoreCommonTableGen) +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis AsmPrinter CodeGen Core MC SelectionDAG Support Target TransformUtils XCoreAsmPrinter XCoreDesc XCoreInfo) +endif(WITHOUT_LLVMBUILD) add_llvm_target(XCoreCodeGen XCoreAsmPrinter.cpp XCoreFrameLowering.cpp Index: lib/Target/XCore/Disassembler/CMakeLists.txt =================================================================== --- lib/Target/XCore/Disassembler/CMakeLists.txt +++ lib/Target/XCore/Disassembler/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MCDisassembler Support XCoreInfo) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMXCoreDisassembler XCoreDisassembler.cpp ) Index: lib/Target/XCore/InstPrinter/CMakeLists.txt =================================================================== --- lib/Target/XCore/InstPrinter/CMakeLists.txt +++ lib/Target/XCore/InstPrinter/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMXCoreAsmPrinter XCoreInstPrinter.cpp ) Index: lib/Target/XCore/MCTargetDesc/CMakeLists.txt =================================================================== --- lib/Target/XCore/MCTargetDesc/CMakeLists.txt +++ lib/Target/XCore/MCTargetDesc/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS MC Support XCoreAsmPrinter XCoreInfo) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMXCoreDesc XCoreMCTargetDesc.cpp XCoreMCAsmInfo.cpp Index: lib/Target/XCore/TargetInfo/CMakeLists.txt =================================================================== --- lib/Target/XCore/TargetInfo/CMakeLists.txt +++ lib/Target/XCore/TargetInfo/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMXCoreInfo XCoreTargetInfo.cpp ) Index: lib/Transforms/Coroutines/CMakeLists.txt =================================================================== --- lib/Transforms/Coroutines/CMakeLists.txt +++ lib/Transforms/Coroutines/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis Core IPO ScalarOpts Support TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMCoroutines Coroutines.cpp CoroCleanup.cpp Index: lib/Transforms/IPO/CMakeLists.txt =================================================================== --- lib/Transforms/IPO/CMakeLists.txt +++ lib/Transforms/IPO/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis BitWriter Core InstCombine IRReader Linker Object ProfileData ScalarOpts Support TransformUtils Vectorize Instrumentation) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMipo AlwaysInliner.cpp ArgumentPromotion.cpp Index: lib/Transforms/InstCombine/CMakeLists.txt =================================================================== --- lib/Transforms/InstCombine/CMakeLists.txt +++ lib/Transforms/InstCombine/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis Core Support TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMInstCombine InstructionCombining.cpp InstCombineAddSub.cpp Index: lib/Transforms/Instrumentation/CMakeLists.txt =================================================================== --- lib/Transforms/Instrumentation/CMakeLists.txt +++ lib/Transforms/Instrumentation/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis Core MC Support TransformUtils ProfileData) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMInstrumentation AddressSanitizer.cpp BoundsChecking.cpp Index: lib/Transforms/ObjCARC/CMakeLists.txt =================================================================== --- lib/Transforms/ObjCARC/CMakeLists.txt +++ lib/Transforms/ObjCARC/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis Core Support TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMObjCARCOpts ObjCARC.cpp ObjCARCOpts.cpp Index: lib/Transforms/Scalar/CMakeLists.txt =================================================================== --- lib/Transforms/Scalar/CMakeLists.txt +++ lib/Transforms/Scalar/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis Core InstCombine Support TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMScalarOpts ADCE.cpp AlignmentFromAssumptions.cpp Index: lib/Transforms/Utils/CMakeLists.txt =================================================================== --- lib/Transforms/Utils/CMakeLists.txt +++ lib/Transforms/Utils/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis Core Support) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMTransformUtils ASanStackFrameLayout.cpp AddDiscriminators.cpp Index: lib/Transforms/Vectorize/CMakeLists.txt =================================================================== --- lib/Transforms/Vectorize/CMakeLists.txt +++ lib/Transforms/Vectorize/CMakeLists.txt @@ -1,3 +1,6 @@ +if(WITHOUT_LLVMBUILD) + set(LLVM_LINK_COMPONENTS Analysis Core Support TransformUtils) +endif(WITHOUT_LLVMBUILD) add_llvm_library(LLVMVectorize BBVectorize.cpp LoadStoreVectorizer.cpp