Rewrite the CMake build to use explicit dependencies between libraries,

specified in the same file that the library itself is created. This is
more idiomatic for CMake builds, and also allows us to correctly specify
dependencies that are missed due to bugs in the GenLibDeps perl script,
or change from compiler to compiler. On Linux, this returns CMake to
a place where it can relably rebuild several targets of LLVM.

I have tried not to change the dependencies from the ones in the current
auto-generated file. The only places I've really diverged are in places
where I was seeing link failures, and added a dependency. The goal of
this patch is not to start changing the dependencies, merely to move
them into the correct location, and an explicit form that we can control
and change when necessary.

This also removes a serialization point in the build because we don't
have to scan all the libraries before we begin building various tools.
We no longer have a step of the build that regenerates a file inside the
source tree. A few other associated cleanups fall out of this.

This isn't really finished yet though. After talking to dgregor he urged
switching to a single CMake macro to construct libraries with both
sources and dependencies in the arguments. Migrating from the two macros
to that style will be a follow-up patch.

Also, llvm-config is still generated with GenLibDeps.pl, which means it
still has slightly buggy dependencies. The internal CMake
'llvm-config-like' macro uses the correct explicitly specified
dependencies however. A future patch will switch llvm-config generation
(when using CMake) to be based on these deps as well.

This may well break Windows. I'm getting a machine set up now to dig
into any failures there. If anyone can chime in with problems they see
or ideas of how to solve them for Windows, much appreciated.

llvm-svn: 136433
This commit is contained in:
Chandler Carruth 2011-07-29 00:14:25 +00:00
parent 9f56d02e6a
commit 9d7feab3e0
87 changed files with 675 additions and 150 deletions

View File

@ -34,6 +34,14 @@ macro(add_llvm_library name)
set_target_properties(${name} PROPERTIES FOLDER "Libraries") set_target_properties(${name} PROPERTIES FOLDER "Libraries")
endmacro(add_llvm_library name) endmacro(add_llvm_library name)
macro(add_llvm_library_dependencies name)
# Save the dependencies of the LLVM library in a variable so that we can
# query it when resolve llvm-config-style component -> library mappings.
set(LLVM_LIB_DEPS_${name} ${ARGN})
# Then add the actual dependencies to the library target.
target_link_libraries(${name} ${ARGN})
endmacro(add_llvm_library_dependencies name)
macro(add_llvm_loadable_module name) macro(add_llvm_loadable_module name)
if( NOT LLVM_ON_UNIX OR CYGWIN ) if( NOT LLVM_ON_UNIX OR CYGWIN )

View File

@ -17,7 +17,6 @@ install(FILES
${llvm_cmake_builddir}/LLVMConfig.cmake ${llvm_cmake_builddir}/LLVMConfig.cmake
${llvm_cmake_builddir}/LLVMConfigVersion.cmake ${llvm_cmake_builddir}/LLVMConfigVersion.cmake
LLVM-Config.cmake LLVM-Config.cmake
LLVMLibDeps.cmake
DESTINATION share/llvm/cmake) DESTINATION share/llvm/cmake)
install(DIRECTORY . install(DIRECTORY .
@ -27,7 +26,6 @@ install(DIRECTORY .
PATTERN LLVMConfig.cmake EXCLUDE PATTERN LLVMConfig.cmake EXCLUDE
PATTERN LLVMConfigVersion.cmake EXCLUDE PATTERN LLVMConfigVersion.cmake EXCLUDE
PATTERN LLVM-Config.cmake EXCLUDE PATTERN LLVM-Config.cmake EXCLUDE
PATTERN LLVMLibDeps.cmake EXCLUDE
PATTERN FindBison.cmake EXCLUDE PATTERN FindBison.cmake EXCLUDE
PATTERN GetTargetTriple.cmake EXCLUDE PATTERN GetTargetTriple.cmake EXCLUDE
PATTERN VersionFromVCS.cmake EXCLUDE PATTERN VersionFromVCS.cmake EXCLUDE

View File

@ -152,7 +152,7 @@ function(explicit_map_components_to_libraries out_libs)
set(processed) set(processed)
while( cursor LESS lst_size ) while( cursor LESS lst_size )
list(GET expanded_components ${cursor} lib) list(GET expanded_components ${cursor} lib)
list(APPEND expanded_components ${MSVC_LIB_DEPS_${lib}}) list(APPEND expanded_components ${LLVM_LIB_DEPS_${lib}})
# Remove duplicates at the front: # Remove duplicates at the front:
list(REVERSE expanded_components) list(REVERSE expanded_components)
list(REMOVE_DUPLICATES expanded_components) list(REMOVE_DUPLICATES expanded_components)
@ -175,29 +175,3 @@ function(explicit_map_components_to_libraries out_libs)
endforeach(c) endforeach(c)
set(${out_libs} ${result} PARENT_SCOPE) set(${out_libs} ${result} PARENT_SCOPE)
endfunction(explicit_map_components_to_libraries) endfunction(explicit_map_components_to_libraries)
# The library dependency data is contained in the file
# LLVMLibDeps.cmake on this directory. It is automatically generated
# by tools/llvm-config/CMakeLists.txt when the build comprises all the
# targets and we are on a environment Posix enough to build the
# llvm-config script. This, in practice, just excludes MSVC.
# When you remove or rename a library from the build, be sure to
# remove its file from lib/ as well, or the GenLibDeps.pl script will
# include it on its analysis!
# The format generated by GenLibDeps.pl
# LLVMARMAsmPrinter.o: LLVMARMCodeGen.o libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMTarget.a
# is translated to:
# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMTarget)
# It is necessary to remove the `lib' prefix and the `.a'.
# This 'sed' script should do the trick:
# sed -e s'#\.a##g' -e 's#libLLVM#LLVM#g' -e 's#: # #' -e 's#\(.*\)#set(MSVC_LIB_DEPS_\1)#' ~/llvm/tools/llvm-config/LibDeps.txt
include(LLVMLibDeps)

View File

@ -1,83 +0,0 @@
set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMDesc LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport)
set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMAsmPrinter LLVMARMDesc LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMARMDesc LLVMARMInfo LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMARMDisassembler LLVMARMDesc LLVMARMInfo LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMARMInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaDesc LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMAlphaDesc LLVMAlphaInfo LLVMMC)
set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMArchive LLVMBitReader LLVMCore LLVMSupport)
set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport)
set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport)
set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport)
set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMAsmPrinter LLVMBlackfinDesc LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMBlackfinDesc LLVMBlackfinInfo LLVMMC)
set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils)
set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMAsmPrinter LLVMCellSPUDesc LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMCellSPUDesc LLVMCellSPUInfo LLVMMC)
set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils)
set(MSVC_LIB_DEPS_LLVMCore LLVMSupport)
set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMMC LLVMTarget)
set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMInstCombine LLVMAnalysis LLVMCore LLVMSupport LLVMTarget LLVMTransformUtils)
set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMSupport LLVMTransformUtils)
set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMTransformUtils)
set(MSVC_LIB_DEPS_LLVMMBlazeAsmParser LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMSupport)
set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeAsmPrinter LLVMMBlazeDesc LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMMBlazeDesc LLVMMBlazeInfo LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMMBlazeDisassembler LLVMMBlazeDesc LLVMMBlazeInfo LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMDesc LLVMARMDisassembler LLVMARMInfo LLVMAlphaDesc LLVMAlphaInfo LLVMBlackfinDesc LLVMBlackfinInfo LLVMCBackendInfo LLVMCellSPUDesc LLVMCellSPUInfo LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeDesc LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430Desc LLVMMSP430Info LLVMMipsDesc LLVMMipsInfo LLVMPTXDesc LLVMPTXInfo LLVMPowerPCDesc LLVMPowerPCInfo LLVMSparcDesc LLVMSparcInfo LLVMSupport LLVMSystemZDesc LLVMSystemZInfo LLVMTarget LLVMX86AsmParser LLVMX86Desc LLVMX86Disassembler LLVMX86Info LLVMXCoreDesc LLVMXCoreInfo)
set(MSVC_LIB_DEPS_LLVMMCJIT LLVMCore LLVMExecutionEngine LLVMRuntimeDyld LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430AsmPrinter LLVMMSP430Desc LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMMSP430Desc LLVMMC LLVMMSP430Info)
set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsAsmPrinter LLVMMipsDesc LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMMipsDesc LLVMMC LLVMMipsInfo LLVMSupport)
set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMObject LLVMSupport)
set(MSVC_LIB_DEPS_LLVMPTXCodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPTXDesc LLVMPTXInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMPTXDesc LLVMMC LLVMPTXInfo LLVMSupport)
set(MSVC_LIB_DEPS_LLVMPTXInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCAsmPrinter LLVMPowerPCDesc LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMPowerPCDesc LLVMMC LLVMPowerPCInfo LLVMSupport)
set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMRuntimeDyld LLVMObject LLVMSupport)
set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMTarget LLVMTransformUtils)
set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMTransformUtils)
set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcDesc LLVMSparcInfo LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMSparcDesc LLVMMC LLVMSparcInfo LLVMSupport)
set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMSupport )
set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystemZDesc LLVMSystemZInfo LLVMTarget)
set(MSVC_LIB_DEPS_LLVMSystemZDesc LLVMMC LLVMSystemZInfo)
set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport)
set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMTarget LLVMipa)
set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMX86Desc LLVMX86Info)
set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport LLVMX86Utils)
set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMX86AsmPrinter LLVMX86Desc LLVMX86Info LLVMX86Utils)
set(MSVC_LIB_DEPS_LLVMX86Desc LLVMMC LLVMSupport LLVMX86AsmPrinter LLVMX86Info)
set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info)
set(MSVC_LIB_DEPS_LLVMX86Info LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMX86Utils LLVMCore LLVMSupport)
set(MSVC_LIB_DEPS_LLVMXCoreCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreDesc LLVMXCoreInfo)
set(MSVC_LIB_DEPS_LLVMXCoreDesc LLVMMC LLVMXCoreInfo)
set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMMC LLVMSupport LLVMTarget)
set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport)
set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils LLVMipa)

View File

@ -58,4 +58,10 @@ add_llvm_library(LLVMAnalysis
ValueTracking.cpp ValueTracking.cpp
) )
add_llvm_library_dependencies(LLVMAnalysis
LLVMCore
LLVMSupport
LLVMTarget
)
add_subdirectory(IPA) add_subdirectory(IPA)

View File

@ -5,3 +5,9 @@ add_llvm_library(LLVMipa
GlobalsModRef.cpp GlobalsModRef.cpp
IPA.cpp IPA.cpp
) )
add_llvm_library_dependencies(LLVMipa
LLVMAnalysis
LLVMCore
LLVMSupport
)

View File

@ -3,3 +3,9 @@ add_llvm_library(LLVMArchive
ArchiveReader.cpp ArchiveReader.cpp
ArchiveWriter.cpp ArchiveWriter.cpp
) )
add_llvm_library_dependencies(LLVMArchive
LLVMBitReader
LLVMCore
LLVMSupport
)

View File

@ -4,3 +4,8 @@ add_llvm_library(LLVMAsmParser
LLParser.cpp LLParser.cpp
Parser.cpp Parser.cpp
) )
add_llvm_library_dependencies(LLVMAsmParser
LLVMCore
LLVMSupport
)

View File

@ -2,3 +2,8 @@ add_llvm_library(LLVMBitReader
BitReader.cpp BitReader.cpp
BitcodeReader.cpp BitcodeReader.cpp
) )
add_llvm_library_dependencies(LLVMBitReader
LLVMCore
LLVMSupport
)

View File

@ -4,3 +4,8 @@ add_llvm_library(LLVMBitWriter
BitcodeWriterPass.cpp BitcodeWriterPass.cpp
ValueEnumerator.cpp ValueEnumerator.cpp
) )
add_llvm_library_dependencies(LLVMBitWriter
LLVMCore
LLVMSupport
)

View File

@ -12,3 +12,12 @@ add_llvm_library(LLVMAsmPrinter
Win64Exception.cpp Win64Exception.cpp
) )
add_llvm_library_dependencies(LLVMAsmPrinter
LLVMAnalysis
LLVMCodeGen
LLVMCore
LLVMMC
LLVMMCParser
LLVMSupport
LLVMTarget
)

View File

@ -97,5 +97,15 @@ add_llvm_library(LLVMCodeGen
VirtRegRewriter.cpp VirtRegRewriter.cpp
) )
add_llvm_library_dependencies(LLVMCodeGen
LLVMAnalysis
LLVMCore
LLVMMC
LLVMScalarOpts
LLVMSupport
LLVMTarget
LLVMTransformUtils
)
add_subdirectory(SelectionDAG) add_subdirectory(SelectionDAG)
add_subdirectory(AsmPrinter) add_subdirectory(AsmPrinter)

View File

@ -21,3 +21,13 @@ add_llvm_library(LLVMSelectionDAG
TargetLowering.cpp TargetLowering.cpp
TargetSelectionDAGInfo.cpp TargetSelectionDAGInfo.cpp
) )
add_llvm_library_dependencies(LLVMSelectionDAG
LLVMAnalysis
LLVMCodeGen
LLVMCore
LLVMMC
LLVMSupport
LLVMTarget
LLVMTransformUtils
)

View File

@ -4,6 +4,13 @@ add_llvm_library(LLVMExecutionEngine
TargetSelect.cpp TargetSelect.cpp
) )
add_llvm_library_dependencies(LLVMExecutionEngine
LLVMCore
LLVMMC
LLVMSupport
LLVMTarget
)
add_subdirectory(Interpreter) add_subdirectory(Interpreter)
add_subdirectory(JIT) add_subdirectory(JIT)
add_subdirectory(MCJIT) add_subdirectory(MCJIT)

View File

@ -12,6 +12,14 @@ add_llvm_library(LLVMInterpreter
Interpreter.cpp Interpreter.cpp
) )
add_llvm_library_dependencies(LLVMInterpreter
LLVMCodeGen
LLVMCore
LLVMExecutionEngine
LLVMSupport
LLVMTarget
)
if( LLVM_ENABLE_FFI ) if( LLVM_ENABLE_FFI )
target_link_libraries( LLVMInterpreter ${FFI_LIBRARY_PATH} ) target_link_libraries( LLVMInterpreter ${FFI_LIBRARY_PATH} )
endif() endif()

View File

@ -10,3 +10,11 @@ add_llvm_library(LLVMJIT
JITMemoryManager.cpp JITMemoryManager.cpp
OProfileJITEventListener.cpp OProfileJITEventListener.cpp
) )
add_llvm_library_dependencies(LLVMJIT
LLVMCore
LLVMExecutionEngine
LLVMRuntimeDyld
LLVMSupport
LLVMTarget
)

View File

@ -2,3 +2,11 @@ add_llvm_library(LLVMMCJIT
MCJIT.cpp MCJIT.cpp
Intercept.cpp Intercept.cpp
) )
add_llvm_library_dependencies(LLVMMCJIT
LLVMCore
LLVMExecutionEngine
LLVMRuntimeDyld
LLVMSupport
LLVMTarget
)

View File

@ -2,3 +2,8 @@ add_llvm_library(LLVMRuntimeDyld
RuntimeDyld.cpp RuntimeDyld.cpp
RuntimeDyldMachO.cpp RuntimeDyldMachO.cpp
) )
add_llvm_library_dependencies(LLVMRuntimeDyld
LLVMObject
LLVMSupport
)

View File

@ -4,3 +4,11 @@ add_llvm_library(LLVMLinker
LinkModules.cpp LinkModules.cpp
Linker.cpp Linker.cpp
) )
add_llvm_library_dependencies(LLVMLinker
LLVMArchive
LLVMBitReader
LLVMCore
LLVMSupport
LLVMTransformUtils
)

View File

@ -42,5 +42,10 @@ add_llvm_library(LLVMMC
MCTargetAsmLexer.cpp MCTargetAsmLexer.cpp
) )
add_llvm_library_dependencies(LLVMMC
LLVMObject
LLVMSupport
)
add_subdirectory(MCParser) add_subdirectory(MCParser)
add_subdirectory(MCDisassembler) add_subdirectory(MCDisassembler)

View File

@ -1,4 +1,3 @@
add_llvm_library(LLVMMCDisassembler add_llvm_library(LLVMMCDisassembler
Disassembler.cpp Disassembler.cpp
EDDisassembler.cpp EDDisassembler.cpp
@ -6,3 +5,44 @@ add_llvm_library(LLVMMCDisassembler
EDOperand.cpp EDOperand.cpp
EDToken.cpp EDToken.cpp
) )
add_llvm_library_dependencies(LLVMMCDisassembler
LLVMARMAsmParser
LLVMARMDesc
LLVMARMDisassembler
LLVMARMInfo
LLVMAlphaDesc
LLVMAlphaInfo
LLVMBlackfinDesc
LLVMBlackfinInfo
LLVMCBackendInfo
LLVMCellSPUDesc
LLVMCellSPUInfo
LLVMCppBackendInfo
LLVMMBlazeAsmParser
LLVMMBlazeDesc
LLVMMBlazeDisassembler
LLVMMBlazeInfo
LLVMMC
LLVMMCParser
LLVMMSP430Desc
LLVMMSP430Info
LLVMMipsDesc
LLVMMipsInfo
LLVMPTXDesc
LLVMPTXInfo
LLVMPowerPCDesc
LLVMPowerPCInfo
LLVMSparcDesc
LLVMSparcInfo
LLVMSupport
LLVMSystemZDesc
LLVMSystemZInfo
LLVMTarget
LLVMX86AsmParser
LLVMX86Desc
LLVMX86Disassembler
LLVMX86Info
LLVMXCoreDesc
LLVMXCoreInfo
)

View File

@ -9,3 +9,8 @@ add_llvm_library(LLVMMCParser
MCAsmParserExtension.cpp MCAsmParserExtension.cpp
MCTargetAsmParser.cpp MCTargetAsmParser.cpp
) )
add_llvm_library_dependencies(LLVMMCParser
LLVMMC
LLVMSupport
)

View File

@ -8,3 +8,8 @@ add_llvm_library(LLVMObject
Object.cpp Object.cpp
ObjectFile.cpp ObjectFile.cpp
) )
add_llvm_library_dependencies(LLVMObject
LLVMCore
LLVMSupport
)

View File

@ -4,4 +4,13 @@ add_llvm_library(LLVMARMAsmParser
ARMAsmLexer.cpp ARMAsmLexer.cpp
ARMAsmParser.cpp ARMAsmParser.cpp
) )
add_dependencies(LLVMARMAsmParser ARMCommonTableGen) add_dependencies(LLVMARMAsmParser ARMCommonTableGen)
add_llvm_library_dependencies(LLVMARMAsmParser
LLVMARMDesc
LLVMARMInfo
LLVMMC
LLVMMCParser
LLVMSupport
)

View File

@ -50,6 +50,20 @@ add_llvm_target(ARMCodeGen
Thumb2SizeReduction.cpp Thumb2SizeReduction.cpp
) )
add_llvm_library_dependencies(LLVMARMCodeGen
LLVMARMAsmPrinter
LLVMARMDesc
LLVMARMInfo
LLVMAnalysis
LLVMAsmPrinter
LLVMCodeGen
LLVMCore
LLVMMC
LLVMSelectionDAG
LLVMSupport
LLVMTarget
)
# workaround for hanging compilation on MSVC10 # workaround for hanging compilation on MSVC10
if( MSVC_VERSION EQUAL 1600 ) if( MSVC_VERSION EQUAL 1600 )
set_property( set_property(

View File

@ -12,3 +12,11 @@ set_property(
) )
endif() endif()
add_dependencies(LLVMARMDisassembler ARMCommonTableGen) add_dependencies(LLVMARMDisassembler ARMCommonTableGen)
add_llvm_library_dependencies(LLVMARMDisassembler
LLVMARMCodeGen
LLVMARMDesc
LLVMARMInfo
LLVMMC
LLVMSupport
)

View File

@ -3,4 +3,10 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/
add_llvm_library(LLVMARMAsmPrinter add_llvm_library(LLVMARMAsmPrinter
ARMInstPrinter.cpp ARMInstPrinter.cpp
) )
add_dependencies(LLVMARMAsmPrinter ARMCommonTableGen) add_dependencies(LLVMARMAsmPrinter ARMCommonTableGen)
add_llvm_library_dependencies(LLVMARMAsmPrinter
LLVMMC
LLVMSupport
)

View File

@ -11,4 +11,9 @@ add_dependencies(LLVMARMDesc ARMCommonTableGen)
# Hack: we need to include 'main' target directory to grab private headers # Hack: we need to include 'main' target directory to grab private headers
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(LLVMARMDesc LLVMARMAsmPrinter) add_llvm_library_dependencies(LLVMARMDesc
LLVMARMInfo
LLVMARMAsmPrinter
LLVMMC
LLVMSupport
)

View File

@ -5,3 +5,9 @@ add_llvm_library(LLVMARMInfo
) )
add_dependencies(LLVMARMInfo ARMCodeGenTable_gen) add_dependencies(LLVMARMInfo ARMCodeGenTable_gen)
add_llvm_library_dependencies(LLVMARMInfo
LLVMMC
LLVMSupport
LLVMTarget
)

View File

@ -22,5 +22,17 @@ add_llvm_target(AlphaCodeGen
AlphaSelectionDAGInfo.cpp AlphaSelectionDAGInfo.cpp
) )
add_llvm_library_dependencies(LLVMAlphaCodeGen
LLVMAlphaDesc
LLVMAlphaInfo
LLVMAsmPrinter
LLVMCodeGen
LLVMCore
LLVMMC
LLVMSelectionDAG
LLVMSupport
LLVMTarget
)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc) add_subdirectory(MCTargetDesc)

View File

@ -2,4 +2,10 @@ add_llvm_library(LLVMAlphaDesc
AlphaMCTargetDesc.cpp AlphaMCTargetDesc.cpp
AlphaMCAsmInfo.cpp AlphaMCAsmInfo.cpp
) )
add_llvm_library_dependencies(LLVMAlphaDesc
LLVMAlphaInfo
LLVMMC
)
add_dependencies(LLVMAlphaDesc AlphaCommonTableGen) add_dependencies(LLVMAlphaDesc AlphaCommonTableGen)

View File

@ -3,4 +3,11 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/
add_llvm_library(LLVMAlphaInfo add_llvm_library(LLVMAlphaInfo
AlphaTargetInfo.cpp AlphaTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMAlphaInfo
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMAlphaInfo AlphaCommonTableGen) add_dependencies(LLVMAlphaInfo AlphaCommonTableGen)

View File

@ -22,5 +22,17 @@ add_llvm_target(BlackfinCodeGen
BlackfinSelectionDAGInfo.cpp BlackfinSelectionDAGInfo.cpp
) )
add_llvm_library_dependencies(LLVMBlackfinCodeGen
LLVMAsmPrinter
LLVMBlackfinDesc
LLVMBlackfinInfo
LLVMCodeGen
LLVMCore
LLVMMC
LLVMSelectionDAG
LLVMSupport
LLVMTarget
)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc) add_subdirectory(MCTargetDesc)

View File

@ -2,4 +2,10 @@ add_llvm_library(LLVMBlackfinDesc
BlackfinMCTargetDesc.cpp BlackfinMCTargetDesc.cpp
BlackfinMCAsmInfo.cpp BlackfinMCAsmInfo.cpp
) )
add_llvm_library_dependencies(LLVMBlackfinDesc
LLVMBlackfinInfo
LLVMMC
)
add_dependencies(LLVMBlackfinDesc BlackfinCommonTableGen) add_dependencies(LLVMBlackfinDesc BlackfinCommonTableGen)

View File

@ -4,4 +4,10 @@ add_llvm_library(LLVMBlackfinInfo
BlackfinTargetInfo.cpp BlackfinTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMBlackfinInfo
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMBlackfinInfo BlackfinCodeGenTable_gen) add_dependencies(LLVMBlackfinInfo BlackfinCodeGenTable_gen)

View File

@ -2,4 +2,16 @@ add_llvm_target(CBackend
CBackend.cpp CBackend.cpp
) )
add_llvm_library_dependencies(LLVMCBackend
LLVMAnalysis
LLVMCBackendInfo
LLVMCodeGen
LLVMCore
LLVMMC
LLVMScalarOpts
LLVMSupport
LLVMTarget
LLVMTransformUtils
)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)

View File

@ -4,3 +4,8 @@ add_llvm_library(LLVMCBackendInfo
CBackendTargetInfo.cpp CBackendTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMCBackendInfo
LLVMMC
LLVMSupport
LLVMTarget
)

View File

@ -14,6 +14,12 @@ add_llvm_library(LLVMTarget
TargetSubtargetInfo.cpp TargetSubtargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMTarget
LLVMCore
LLVMMC
LLVMSupport
)
set(LLVM_ENUM_ASM_PRINTERS "") set(LLVM_ENUM_ASM_PRINTERS "")
set(LLVM_ENUM_ASM_PARSERS "") set(LLVM_ENUM_ASM_PARSERS "")
set(LLVM_ENUM_DISASSEMBLERS "") set(LLVM_ENUM_DISASSEMBLERS "")

View File

@ -23,5 +23,17 @@ add_llvm_target(CellSPUCodeGen
SPUNopFiller.cpp SPUNopFiller.cpp
) )
add_llvm_library_dependencies(LLVMCellSPUCodeGen
LLVMAsmPrinter
LLVMCellSPUDesc
LLVMCellSPUInfo
LLVMCodeGen
LLVMCore
LLVMMC
LLVMSelectionDAG
LLVMSupport
LLVMTarget
)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc) add_subdirectory(MCTargetDesc)

View File

@ -2,4 +2,10 @@ add_llvm_library(LLVMCellSPUDesc
SPUMCTargetDesc.cpp SPUMCTargetDesc.cpp
SPUMCAsmInfo.cpp SPUMCAsmInfo.cpp
) )
add_llvm_library_dependencies(LLVMCellSPUDesc
LLVMCellSPUInfo
LLVMMC
)
add_dependencies(LLVMCellSPUDesc CellSPUCommonTableGen) add_dependencies(LLVMCellSPUDesc CellSPUCommonTableGen)

View File

@ -4,4 +4,10 @@ add_llvm_library(LLVMCellSPUInfo
CellSPUTargetInfo.cpp CellSPUTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMCellSPUInfo
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMCellSPUInfo CellSPUCodeGenTable_gen) add_dependencies(LLVMCellSPUInfo CellSPUCodeGenTable_gen)

View File

@ -2,4 +2,11 @@ add_llvm_target(CppBackend
CPPBackend.cpp CPPBackend.cpp
) )
add_llvm_library_dependencies(LLVMCppBackend
LLVMCore
LLVMCppBackendInfo
LLVMSupport
LLVMTarget
)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)

View File

@ -4,3 +4,7 @@ add_llvm_library(LLVMCppBackendInfo
CppBackendTargetInfo.cpp CppBackendTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMCppBackendInfo
LLVMMC
LLVMTarget
)

View File

@ -5,5 +5,12 @@ add_llvm_library(LLVMMBlazeAsmParser
MBlazeAsmLexer.cpp MBlazeAsmLexer.cpp
MBlazeAsmParser.cpp MBlazeAsmParser.cpp
) )
add_dependencies(LLVMMBlazeAsmParser MBlazeCommonTableGen)
add_llvm_library_dependencies(LLVMMBlazeAsmParser
LLVMMBlazeInfo
LLVMMC
LLVMMCParser
LLVMSupport
)
add_dependencies(LLVMMBlazeAsmParser MBlazeCommonTableGen)

View File

@ -29,6 +29,19 @@ add_llvm_target(MBlazeCodeGen
MBlazeELFWriterInfo.cpp MBlazeELFWriterInfo.cpp
) )
add_llvm_library_dependencies(LLVMMBlazeCodeGen
LLVMAsmPrinter
LLVMCodeGen
LLVMCore
LLVMMBlazeAsmPrinter
LLVMMBlazeDesc
LLVMMBlazeInfo
LLVMMC
LLVMSelectionDAG
LLVMSupport
LLVMTarget
)
add_subdirectory(AsmParser) add_subdirectory(AsmParser)
add_subdirectory(Disassembler) add_subdirectory(Disassembler)
add_subdirectory(InstPrinter) add_subdirectory(InstPrinter)

View File

@ -13,4 +13,12 @@ set_property(
) )
endif() endif()
add_llvm_library_dependencies(LLVMMBlazeDisassembler
LLVMMBlazeCodeGen
LLVMMBlazeDesc
LLVMMBlazeInfo
LLVMMC
LLVMSupport
)
add_dependencies(LLVMMBlazeDisassembler MBlazeCommonTableGen) add_dependencies(LLVMMBlazeDisassembler MBlazeCommonTableGen)

View File

@ -2,7 +2,12 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/.. ) ${CMAKE_CURRENT_SOURCE_DIR}/.. )
add_llvm_library(LLVMMBlazeAsmPrinter add_llvm_library(LLVMMBlazeAsmPrinter
MBlazeInstPrinter.cpp MBlazeInstPrinter.cpp
)
add_llvm_library_dependencies(LLVMMBlazeAsmPrinter
LLVMMC
LLVMSupport
) )
add_dependencies(LLVMMBlazeAsmPrinter MBlazeCommonTableGen) add_dependencies(LLVMMBlazeAsmPrinter MBlazeCommonTableGen)

View File

@ -4,6 +4,12 @@ add_llvm_library(LLVMMBlazeDesc
MBlazeMCCodeEmitter.cpp MBlazeMCCodeEmitter.cpp
MBlazeMCTargetDesc.cpp MBlazeMCTargetDesc.cpp
) )
add_dependencies(LLVMMBlazeDesc MBlazeCommonTableGen)
target_link_libraries(LLVMMBlazeDesc LLVMMBlazeAsmPrinter) add_llvm_library_dependencies(LLVMMBlazeDesc
LLVMMBlazeAsmPrinter
LLVMMBlazeInfo
LLVMMC
LLVMSupport
)
add_dependencies(LLVMMBlazeDesc MBlazeCommonTableGen)

View File

@ -5,4 +5,10 @@ add_llvm_library(LLVMMBlazeInfo
MBlazeTargetInfo.cpp MBlazeTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMMBlazeInfo
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMMBlazeInfo MBlazeCodeGenTable_gen) add_dependencies(LLVMMBlazeInfo MBlazeCodeGenTable_gen)

View File

@ -22,6 +22,19 @@ add_llvm_target(MSP430CodeGen
MSP430MCInstLower.cpp MSP430MCInstLower.cpp
) )
add_llvm_library_dependencies(LLVMMSP430CodeGen
LLVMAsmPrinter
LLVMCodeGen
LLVMCore
LLVMMC
LLVMMSP430AsmPrinter
LLVMMSP430Desc
LLVMMSP430Info
LLVMSelectionDAG
LLVMSupport
LLVMTarget
)
add_subdirectory(InstPrinter) add_subdirectory(InstPrinter)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc) add_subdirectory(MCTargetDesc)

View File

@ -3,4 +3,10 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/
add_llvm_library(LLVMMSP430AsmPrinter add_llvm_library(LLVMMSP430AsmPrinter
MSP430InstPrinter.cpp MSP430InstPrinter.cpp
) )
add_llvm_library_dependencies(LLVMMSP430AsmPrinter
LLVMMC
LLVMSupport
)
add_dependencies(LLVMMSP430AsmPrinter MSP430CommonTableGen) add_dependencies(LLVMMSP430AsmPrinter MSP430CommonTableGen)

View File

@ -2,6 +2,11 @@ add_llvm_library(LLVMMSP430Desc
MSP430MCTargetDesc.cpp MSP430MCTargetDesc.cpp
MSP430MCAsmInfo.cpp MSP430MCAsmInfo.cpp
) )
add_dependencies(LLVMMSP430Desc MSP430CommonTableGen)
target_link_libraries(LLVMMSP430Desc LLVMMSP430AsmPrinter) add_llvm_library_dependencies(LLVMMSP430Desc
LLVMMC
LLVMMSP430AsmPrinter
LLVMMSP430Info
)
add_dependencies(LLVMMSP430Desc MSP430CommonTableGen)

View File

@ -4,4 +4,10 @@ add_llvm_library(LLVMMSP430Info
MSP430TargetInfo.cpp MSP430TargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMMSP430Info
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMMSP430Info MSP430CodeGenTable_gen) add_dependencies(LLVMMSP430Info MSP430CodeGenTable_gen)

View File

@ -28,6 +28,19 @@ add_llvm_target(MipsCodeGen
MipsSelectionDAGInfo.cpp MipsSelectionDAGInfo.cpp
) )
add_llvm_library_dependencies(LLVMMipsCodeGen
LLVMAsmPrinter
LLVMCodeGen
LLVMCore
LLVMMC
LLVMMipsAsmPrinter
LLVMMipsDesc
LLVMMipsInfo
LLVMSelectionDAG
LLVMSupport
LLVMTarget
)
add_subdirectory(InstPrinter) add_subdirectory(InstPrinter)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc) add_subdirectory(MCTargetDesc)

View File

@ -3,4 +3,10 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/
add_llvm_library(LLVMMipsAsmPrinter add_llvm_library(LLVMMipsAsmPrinter
MipsInstPrinter.cpp MipsInstPrinter.cpp
) )
add_llvm_library_dependencies(LLVMMipsAsmPrinter
LLVMMC
LLVMSupport
)
add_dependencies(LLVMMipsAsmPrinter MipsCommonTableGen) add_dependencies(LLVMMipsAsmPrinter MipsCommonTableGen)

View File

@ -2,6 +2,12 @@ add_llvm_library(LLVMMipsDesc
MipsMCTargetDesc.cpp MipsMCTargetDesc.cpp
MipsMCAsmInfo.cpp MipsMCAsmInfo.cpp
) )
add_dependencies(LLVMMipsDesc MipsCommonTableGen)
target_link_libraries(LLVMMipsDesc LLVMMipsAsmPrinter) add_llvm_library_dependencies(LLVMMipsDesc
LLVMMC
LLVMMipsAsmPrinter
LLVMMipsInfo
LLVMSupport
)
add_dependencies(LLVMMipsDesc MipsCommonTableGen)

View File

@ -4,4 +4,10 @@ add_llvm_library(LLVMMipsInfo
MipsTargetInfo.cpp MipsTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMMipsInfo
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMMipsInfo MipsCodeGenTable_gen) add_dependencies(LLVMMipsInfo MipsCodeGenTable_gen)

View File

@ -21,5 +21,18 @@ add_llvm_target(PTXCodeGen
PTXTargetMachine.cpp PTXTargetMachine.cpp
) )
add_llvm_library_dependencies(LLVMPTXCodeGen
LLVMAnalysis
LLVMAsmPrinter
LLVMCodeGen
LLVMCore
LLVMMC
LLVMPTXDesc
LLVMPTXInfo
LLVMSelectionDAG
LLVMSupport
LLVMTarget
)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc) add_subdirectory(MCTargetDesc)

View File

@ -2,4 +2,11 @@ add_llvm_library(LLVMPTXDesc
PTXMCTargetDesc.cpp PTXMCTargetDesc.cpp
PTXMCAsmInfo.cpp PTXMCAsmInfo.cpp
) )
add_llvm_library_dependencies(LLVMPTXDesc
LLVMMC
LLVMPTXInfo
LLVMSupport
)
add_dependencies(LLVMPTXDesc PTXCommonTableGen) add_dependencies(LLVMPTXDesc PTXCommonTableGen)

View File

@ -4,4 +4,10 @@ add_llvm_library(LLVMPTXInfo
PTXTargetInfo.cpp PTXTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMPTXInfo
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMPTXInfo PTXCodeGenTable_gen) add_dependencies(LLVMPTXInfo PTXCodeGenTable_gen)

View File

@ -27,6 +27,20 @@ add_llvm_target(PowerPCCodeGen
PPCSelectionDAGInfo.cpp PPCSelectionDAGInfo.cpp
) )
add_llvm_library_dependencies(LLVMPowerPCCodeGen
LLVMAnalysis
LLVMAsmPrinter
LLVMCodeGen
LLVMCore
LLVMMC
LLVMPowerPCAsmPrinter
LLVMPowerPCDesc
LLVMPowerPCInfo
LLVMSelectionDAG
LLVMSupport
LLVMTarget
)
add_subdirectory(InstPrinter) add_subdirectory(InstPrinter)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc) add_subdirectory(MCTargetDesc)

View File

@ -3,4 +3,10 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/
add_llvm_library(LLVMPowerPCAsmPrinter add_llvm_library(LLVMPowerPCAsmPrinter
PPCInstPrinter.cpp PPCInstPrinter.cpp
) )
add_llvm_library_dependencies(LLVMPowerPCAsmPrinter
LLVMMC
LLVMSupport
)
add_dependencies(LLVMPowerPCAsmPrinter PowerPCCommonTableGen) add_dependencies(LLVMPowerPCAsmPrinter PowerPCCommonTableGen)

View File

@ -5,6 +5,12 @@ add_llvm_library(LLVMPowerPCDesc
PPCMCCodeEmitter.cpp PPCMCCodeEmitter.cpp
PPCPredicates.cpp PPCPredicates.cpp
) )
add_dependencies(LLVMPowerPCDesc PowerPCCommonTableGen)
target_link_libraries(LLVMPowerPCDesc LLVMPowerPCAsmPrinter) add_llvm_library_dependencies(LLVMPowerPCDesc
LLVMMC
LLVMPowerPCAsmPrinter
LLVMPowerPCInfo
LLVMSupport
)
add_dependencies(LLVMPowerPCDesc PowerPCCommonTableGen)

View File

@ -4,4 +4,10 @@ add_llvm_library(LLVMPowerPCInfo
PowerPCTargetInfo.cpp PowerPCTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMPowerPCInfo
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMPowerPCInfo PowerPCCodeGenTable_gen) add_dependencies(LLVMPowerPCInfo PowerPCCodeGenTable_gen)

View File

@ -22,5 +22,17 @@ add_llvm_target(SparcCodeGen
SparcSelectionDAGInfo.cpp SparcSelectionDAGInfo.cpp
) )
add_llvm_library_dependencies(LLVMSparcCodeGen
LLVMAsmPrinter
LLVMCodeGen
LLVMCore
LLVMMC
LLVMSelectionDAG
LLVMSparcDesc
LLVMSparcInfo
LLVMSupport
LLVMTarget
)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc) add_subdirectory(MCTargetDesc)

View File

@ -2,4 +2,11 @@ add_llvm_library(LLVMSparcDesc
SparcMCTargetDesc.cpp SparcMCTargetDesc.cpp
SparcMCAsmInfo.cpp SparcMCAsmInfo.cpp
) )
add_llvm_library_dependencies(LLVMSparcDesc
LLVMMC
LLVMSparcInfo
LLVMSupport
)
add_dependencies(LLVMSparcDesc SparcCommonTableGen) add_dependencies(LLVMSparcDesc SparcCommonTableGen)

View File

@ -4,4 +4,10 @@ add_llvm_library(LLVMSparcInfo
SparcTargetInfo.cpp SparcTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMSparcInfo
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMSparcInfo SparcCodeGenTable_gen) add_dependencies(LLVMSparcInfo SparcCodeGenTable_gen)

View File

@ -20,5 +20,17 @@ add_llvm_target(SystemZCodeGen
SystemZSelectionDAGInfo.cpp SystemZSelectionDAGInfo.cpp
) )
add_llvm_library_dependencies(LLVMSystemZCodeGen
LLVMAsmPrinter
LLVMCodeGen
LLVMCore
LLVMMC
LLVMSelectionDAG
LLVMSupport
LLVMSystemZDesc
LLVMSystemZInfo
LLVMTarget
)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc) add_subdirectory(MCTargetDesc)

View File

@ -2,6 +2,12 @@ add_llvm_library(LLVMSystemZDesc
SystemZMCTargetDesc.cpp SystemZMCTargetDesc.cpp
SystemZMCAsmInfo.cpp SystemZMCAsmInfo.cpp
) )
add_llvm_library_dependencies(LLVMSystemZDesc
LLVMMC
LLVMSystemZInfo
)
add_dependencies(LLVMSystemZDesc SystemZCommonTableGen) add_dependencies(LLVMSystemZDesc SystemZCommonTableGen)
# Hack: we need to include 'main' target directory to grab private headers # Hack: we need to include 'main' target directory to grab private headers

View File

@ -4,4 +4,10 @@ add_llvm_library(LLVMSystemZInfo
SystemZTargetInfo.cpp SystemZTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMSystemZInfo
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMSystemZInfo SystemZCodeGenTable_gen) add_dependencies(LLVMSystemZInfo SystemZCodeGenTable_gen)

View File

@ -4,4 +4,13 @@ add_llvm_library(LLVMX86AsmParser
X86AsmLexer.cpp X86AsmLexer.cpp
X86AsmParser.cpp X86AsmParser.cpp
) )
add_llvm_library_dependencies(LLVMX86AsmParser
LLVMMC
LLVMMCParser
LLVMSupport
LLVMX86Desc
LLVMX86Info
)
add_dependencies(LLVMX86AsmParser X86CommonTableGen) add_dependencies(LLVMX86AsmParser X86CommonTableGen)

View File

@ -51,6 +51,19 @@ endif()
add_llvm_target(X86CodeGen ${sources}) add_llvm_target(X86CodeGen ${sources})
add_llvm_library_dependencies(LLVMX86CodeGen
LLVMAnalysis
LLVMAsmPrinter
LLVMCodeGen
LLVMCore
LLVMMC
LLVMSelectionDAG
LLVMSupport
LLVMTarget
LLVMX86AsmPrinter
LLVMX86Desc
)
add_subdirectory(AsmParser) add_subdirectory(AsmParser)
add_subdirectory(Disassembler) add_subdirectory(Disassembler)
add_subdirectory(InstPrinter) add_subdirectory(InstPrinter)

View File

@ -4,6 +4,13 @@ add_llvm_library(LLVMX86Disassembler
X86Disassembler.cpp X86Disassembler.cpp
X86DisassemblerDecoder.c X86DisassemblerDecoder.c
) )
add_llvm_library_dependencies(LLVMX86Disassembler
LLVMMC
LLVMSupport
LLVMX86Info
)
# workaround for hanging compilation on MSVC9 and 10 # workaround for hanging compilation on MSVC9 and 10
if( MSVC_VERSION EQUAL 1400 OR MSVC_VERSION EQUAL 1500 OR MSVC_VERSION EQUAL 1600 ) if( MSVC_VERSION EQUAL 1400 OR MSVC_VERSION EQUAL 1500 OR MSVC_VERSION EQUAL 1600 )
set_property( set_property(
@ -11,4 +18,5 @@ set_property(
PROPERTY COMPILE_FLAGS "/Od" PROPERTY COMPILE_FLAGS "/Od"
) )
endif() endif()
add_dependencies(LLVMX86Disassembler X86CommonTableGen) add_dependencies(LLVMX86Disassembler X86CommonTableGen)

View File

@ -5,4 +5,11 @@ add_llvm_library(LLVMX86AsmPrinter
X86IntelInstPrinter.cpp X86IntelInstPrinter.cpp
X86InstComments.cpp X86InstComments.cpp
) )
add_llvm_library_dependencies(LLVMX86AsmPrinter
LLVMMC
LLVMSupport
LLVMX86Utils
)
add_dependencies(LLVMX86AsmPrinter X86CommonTableGen) add_dependencies(LLVMX86AsmPrinter X86CommonTableGen)

View File

@ -5,9 +5,16 @@ add_llvm_library(LLVMX86Desc
X86MCCodeEmitter.cpp X86MCCodeEmitter.cpp
X86MachObjectWriter.cpp X86MachObjectWriter.cpp
) )
add_llvm_library_dependencies(LLVMX86Desc
LLVMMC
LLVMSupport
LLVMX86AsmPrinter
LLVMX86AsmPrinter
LLVMX86Info
)
add_dependencies(LLVMX86Desc X86CommonTableGen) add_dependencies(LLVMX86Desc X86CommonTableGen)
# Hack: we need to include 'main' target directory to grab private headers # Hack: we need to include 'main' target directory to grab private headers
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(LLVMX86Desc LLVMX86AsmPrinter)

View File

@ -4,4 +4,10 @@ add_llvm_library(LLVMX86Info
X86TargetInfo.cpp X86TargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMX86Info
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMX86Info X86CodeGenTable_gen) add_dependencies(LLVMX86Info X86CodeGenTable_gen)

View File

@ -3,4 +3,10 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/
add_llvm_library(LLVMX86Utils add_llvm_library(LLVMX86Utils
X86ShuffleDecode.cpp X86ShuffleDecode.cpp
) )
add_llvm_library_dependencies(LLVMX86Utils
LLVMCore
LLVMSupport
)
add_dependencies(LLVMX86Utils X86CodeGenTable_gen) add_dependencies(LLVMX86Utils X86CodeGenTable_gen)

View File

@ -21,5 +21,17 @@ add_llvm_target(XCoreCodeGen
XCoreSelectionDAGInfo.cpp XCoreSelectionDAGInfo.cpp
) )
add_llvm_library_dependencies(LLVMXCoreCodeGen
LLVMAsmPrinter
LLVMCodeGen
LLVMCore
LLVMMC
LLVMSelectionDAG
LLVMSupport
LLVMTarget
LLVMXCoreDesc
LLVMXCoreInfo
)
add_subdirectory(TargetInfo) add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc) add_subdirectory(MCTargetDesc)

View File

@ -2,6 +2,12 @@ add_llvm_library(LLVMXCoreDesc
XCoreMCTargetDesc.cpp XCoreMCTargetDesc.cpp
XCoreMCAsmInfo.cpp XCoreMCAsmInfo.cpp
) )
add_llvm_library_dependencies(LLVMXCoreDesc
LLVMMC
LLVMXCoreInfo
)
add_dependencies(LLVMXCoreDesc XCoreCommonTableGen) add_dependencies(LLVMXCoreDesc XCoreCommonTableGen)
# Hack: we need to include 'main' target directory to grab private headers # Hack: we need to include 'main' target directory to grab private headers

View File

@ -4,4 +4,10 @@ add_llvm_library(LLVMXCoreInfo
XCoreTargetInfo.cpp XCoreTargetInfo.cpp
) )
add_llvm_library_dependencies(LLVMXCoreInfo
LLVMMC
LLVMSupport
LLVMTarget
)
add_dependencies(LLVMXCoreInfo XCoreCodeGenTable_gen) add_dependencies(LLVMXCoreInfo XCoreCodeGenTable_gen)

View File

@ -20,3 +20,13 @@ add_llvm_library(LLVMipo
StripDeadPrototypes.cpp StripDeadPrototypes.cpp
StripSymbols.cpp StripSymbols.cpp
) )
add_llvm_library_dependencies(LLVMipo
LLVMAnalysis
LLVMCore
LLVMScalarOpts
LLVMSupport
LLVMTarget
LLVMTransformUtils
LLVMipa
)

View File

@ -13,3 +13,11 @@ add_llvm_library(LLVMInstCombine
InstCombineSimplifyDemanded.cpp InstCombineSimplifyDemanded.cpp
InstCombineVectorOps.cpp InstCombineVectorOps.cpp
) )
add_llvm_library_dependencies(LLVMInstCombine
LLVMAnalysis
LLVMCore
LLVMSupport
LLVMTarget
LLVMTransformUtils
)

View File

@ -6,3 +6,10 @@ add_llvm_library(LLVMInstrumentation
PathProfiling.cpp PathProfiling.cpp
ProfilingUtils.cpp ProfilingUtils.cpp
) )
add_llvm_library_dependencies(LLVMInstrumentation
LLVMAnalysis
LLVMCore
LLVMSupport
LLVMTransformUtils
)

View File

@ -32,3 +32,12 @@ add_llvm_library(LLVMScalarOpts
TailDuplication.cpp TailDuplication.cpp
TailRecursionElimination.cpp TailRecursionElimination.cpp
) )
add_llvm_library_dependencies(LLVMScalarOpts
LLVMAnalysis
LLVMCore
LLVMInstCombine
LLVMSupport
LLVMTarget
LLVMTransformUtils
)

View File

@ -27,3 +27,10 @@ add_llvm_library(LLVMTransformUtils
ValueMapper.cpp ValueMapper.cpp
) )
add_llvm_library_dependencies(LLVMTransformUtils
LLVMAnalysis
LLVMCore
LLVMSupport
LLVMTarget
LLVMipa
)

View File

@ -36,3 +36,5 @@ add_llvm_library(LLVMCore
ValueTypes.cpp ValueTypes.cpp
Verifier.cpp Verifier.cpp
) )
add_llvm_library_dependencies(LLVMCore LLVMSupport)

View File

@ -138,27 +138,3 @@ install(FILES ${LLVM_CONFIG}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE WORLD_READ WORLD_EXECUTE
DESTINATION bin) DESTINATION bin)
# Regeneration of library dependencies.
# See the comments at the end of cmake/modules/LLVM-Config.cmake for
# notes and guidelines.
set(LLVMLibDeps ${LLVM_MAIN_SRC_DIR}/cmake/modules/LLVMLibDeps.cmake)
set(LLVMLibDeps_TMP ${CMAKE_CURRENT_BINARY_DIR}/LLVMLibDeps.cmake.tmp)
add_custom_command(OUTPUT ${LLVMLibDeps_TMP}
COMMAND sed -e s'@\\.a@@g' -e s'@\\.so@@g' -e 's@libLLVM@LLVM@g' -e 's@: @ @' -e 's@\\\(.*\\\)@set\(MSVC_LIB_DEPS_\\1\)@' ${FINAL_LIBDEPS} > ${LLVMLibDeps_TMP}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LLVMLibDeps_TMP} ${LLVMLibDeps}
DEPENDS ${FINAL_LIBDEPS}
COMMENT "Updating cmake library dependencies file ${LLVMLibDeps}"
)
if( LLVM_TARGETS_TO_BUILD STREQUAL LLVM_ALL_TARGETS )
add_custom_target(llvmlibdeps.target ALL DEPENDS ${LLVMLibDeps_TMP})
add_dependencies(llvmlibdeps.target llvm-config.target)
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} llvmlibdeps.target)
endif()
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)