diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-07-29 00:14:25 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-07-29 00:14:25 +0000 |
commit | 9d7feab3e04d2d00c9a7907ab990c00df6a0d65a (patch) | |
tree | 1719a22afbc32c37c8add65d040cb8a5ccb9af71 /llvm/lib/Target | |
parent | 9f56d02e6a0997cf584ae15961ab8d6b4ccd99f9 (diff) | |
download | bcm5719-llvm-9d7feab3e04d2d00c9a7907ab990c00df6a0d65a.tar.gz bcm5719-llvm-9d7feab3e04d2d00c9a7907ab990c00df6a0d65a.zip |
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
Diffstat (limited to 'llvm/lib/Target')
57 files changed, 461 insertions, 13 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt b/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt index 88393e313a8..3f5ad39debc 100644 --- a/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt @@ -4,4 +4,13 @@ add_llvm_library(LLVMARMAsmParser ARMAsmLexer.cpp ARMAsmParser.cpp ) + add_dependencies(LLVMARMAsmParser ARMCommonTableGen) + +add_llvm_library_dependencies(LLVMARMAsmParser + LLVMARMDesc + LLVMARMInfo + LLVMMC + LLVMMCParser + LLVMSupport + ) diff --git a/llvm/lib/Target/ARM/CMakeLists.txt b/llvm/lib/Target/ARM/CMakeLists.txt index 8394be52cd1..42b450959f3 100644 --- a/llvm/lib/Target/ARM/CMakeLists.txt +++ b/llvm/lib/Target/ARM/CMakeLists.txt @@ -50,6 +50,20 @@ add_llvm_target(ARMCodeGen Thumb2SizeReduction.cpp ) +add_llvm_library_dependencies(LLVMARMCodeGen + LLVMARMAsmPrinter + LLVMARMDesc + LLVMARMInfo + LLVMAnalysis + LLVMAsmPrinter + LLVMCodeGen + LLVMCore + LLVMMC + LLVMSelectionDAG + LLVMSupport + LLVMTarget + ) + # workaround for hanging compilation on MSVC10 if( MSVC_VERSION EQUAL 1600 ) set_property( diff --git a/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt b/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt index a4238aae54f..952dab53ec7 100644 --- a/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt @@ -12,3 +12,11 @@ set_property( ) endif() add_dependencies(LLVMARMDisassembler ARMCommonTableGen) + +add_llvm_library_dependencies(LLVMARMDisassembler + LLVMARMCodeGen + LLVMARMDesc + LLVMARMInfo + LLVMMC + LLVMSupport + ) diff --git a/llvm/lib/Target/ARM/InstPrinter/CMakeLists.txt b/llvm/lib/Target/ARM/InstPrinter/CMakeLists.txt index 7b6193aeeff..fa0b4957ccd 100644 --- a/llvm/lib/Target/ARM/InstPrinter/CMakeLists.txt +++ b/llvm/lib/Target/ARM/InstPrinter/CMakeLists.txt @@ -3,4 +3,10 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/ add_llvm_library(LLVMARMAsmPrinter ARMInstPrinter.cpp ) + add_dependencies(LLVMARMAsmPrinter ARMCommonTableGen) + +add_llvm_library_dependencies(LLVMARMAsmPrinter + LLVMMC + LLVMSupport + ) diff --git a/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt index df2cf81be2c..83fd641c31a 100644 --- a/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt @@ -11,4 +11,9 @@ add_dependencies(LLVMARMDesc ARMCommonTableGen) # Hack: we need to include 'main' target directory to grab private headers include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..) -target_link_libraries(LLVMARMDesc LLVMARMAsmPrinter) +add_llvm_library_dependencies(LLVMARMDesc + LLVMARMInfo + LLVMARMAsmPrinter + LLVMMC + LLVMSupport + ) diff --git a/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt b/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt index 3910bb02e21..3ccd4c3d53a 100644 --- a/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt @@ -5,3 +5,9 @@ add_llvm_library(LLVMARMInfo ) add_dependencies(LLVMARMInfo ARMCodeGenTable_gen) + +add_llvm_library_dependencies(LLVMARMInfo + LLVMMC + LLVMSupport + LLVMTarget + ) diff --git a/llvm/lib/Target/Alpha/CMakeLists.txt b/llvm/lib/Target/Alpha/CMakeLists.txt index 5444e1ab085..63412c144b0 100644 --- a/llvm/lib/Target/Alpha/CMakeLists.txt +++ b/llvm/lib/Target/Alpha/CMakeLists.txt @@ -22,5 +22,17 @@ add_llvm_target(AlphaCodeGen AlphaSelectionDAGInfo.cpp ) +add_llvm_library_dependencies(LLVMAlphaCodeGen + LLVMAlphaDesc + LLVMAlphaInfo + LLVMAsmPrinter + LLVMCodeGen + LLVMCore + LLVMMC + LLVMSelectionDAG + LLVMSupport + LLVMTarget + ) + add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) diff --git a/llvm/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt index 733b1c01d43..f745ecbdb67 100644 --- a/llvm/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt @@ -2,4 +2,10 @@ add_llvm_library(LLVMAlphaDesc AlphaMCTargetDesc.cpp AlphaMCAsmInfo.cpp ) + +add_llvm_library_dependencies(LLVMAlphaDesc + LLVMAlphaInfo + LLVMMC + ) + add_dependencies(LLVMAlphaDesc AlphaCommonTableGen) diff --git a/llvm/lib/Target/Alpha/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Alpha/TargetInfo/CMakeLists.txt index a52457d6332..cac3178b789 100644 --- a/llvm/lib/Target/Alpha/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/Alpha/TargetInfo/CMakeLists.txt @@ -3,4 +3,11 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/ add_llvm_library(LLVMAlphaInfo AlphaTargetInfo.cpp ) + +add_llvm_library_dependencies(LLVMAlphaInfo + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMAlphaInfo AlphaCommonTableGen) diff --git a/llvm/lib/Target/Blackfin/CMakeLists.txt b/llvm/lib/Target/Blackfin/CMakeLists.txt index e69ffa4a3ad..a0b2e935cfb 100644 --- a/llvm/lib/Target/Blackfin/CMakeLists.txt +++ b/llvm/lib/Target/Blackfin/CMakeLists.txt @@ -22,5 +22,17 @@ add_llvm_target(BlackfinCodeGen BlackfinSelectionDAGInfo.cpp ) +add_llvm_library_dependencies(LLVMBlackfinCodeGen + LLVMAsmPrinter + LLVMBlackfinDesc + LLVMBlackfinInfo + LLVMCodeGen + LLVMCore + LLVMMC + LLVMSelectionDAG + LLVMSupport + LLVMTarget + ) + add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) diff --git a/llvm/lib/Target/Blackfin/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Blackfin/MCTargetDesc/CMakeLists.txt index 7ea79b498e1..73315d852cb 100644 --- a/llvm/lib/Target/Blackfin/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/Blackfin/MCTargetDesc/CMakeLists.txt @@ -2,4 +2,10 @@ add_llvm_library(LLVMBlackfinDesc BlackfinMCTargetDesc.cpp BlackfinMCAsmInfo.cpp ) + +add_llvm_library_dependencies(LLVMBlackfinDesc + LLVMBlackfinInfo + LLVMMC + ) + add_dependencies(LLVMBlackfinDesc BlackfinCommonTableGen) diff --git a/llvm/lib/Target/Blackfin/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Blackfin/TargetInfo/CMakeLists.txt index 5ca80604f63..73faf1bcd31 100644 --- a/llvm/lib/Target/Blackfin/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/Blackfin/TargetInfo/CMakeLists.txt @@ -4,4 +4,10 @@ add_llvm_library(LLVMBlackfinInfo BlackfinTargetInfo.cpp ) +add_llvm_library_dependencies(LLVMBlackfinInfo + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMBlackfinInfo BlackfinCodeGenTable_gen) diff --git a/llvm/lib/Target/CBackend/CMakeLists.txt b/llvm/lib/Target/CBackend/CMakeLists.txt index a23ff852970..96ae49f01fc 100644 --- a/llvm/lib/Target/CBackend/CMakeLists.txt +++ b/llvm/lib/Target/CBackend/CMakeLists.txt @@ -2,4 +2,16 @@ add_llvm_target(CBackend CBackend.cpp ) +add_llvm_library_dependencies(LLVMCBackend + LLVMAnalysis + LLVMCBackendInfo + LLVMCodeGen + LLVMCore + LLVMMC + LLVMScalarOpts + LLVMSupport + LLVMTarget + LLVMTransformUtils + ) + add_subdirectory(TargetInfo) diff --git a/llvm/lib/Target/CBackend/TargetInfo/CMakeLists.txt b/llvm/lib/Target/CBackend/TargetInfo/CMakeLists.txt index 5b35fa7c065..8e616bebd53 100644 --- a/llvm/lib/Target/CBackend/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/CBackend/TargetInfo/CMakeLists.txt @@ -4,3 +4,8 @@ add_llvm_library(LLVMCBackendInfo CBackendTargetInfo.cpp ) +add_llvm_library_dependencies(LLVMCBackendInfo + LLVMMC + LLVMSupport + LLVMTarget + ) diff --git a/llvm/lib/Target/CMakeLists.txt b/llvm/lib/Target/CMakeLists.txt index d91940aea44..6620882f227 100644 --- a/llvm/lib/Target/CMakeLists.txt +++ b/llvm/lib/Target/CMakeLists.txt @@ -14,6 +14,12 @@ add_llvm_library(LLVMTarget TargetSubtargetInfo.cpp ) +add_llvm_library_dependencies(LLVMTarget + LLVMCore + LLVMMC + LLVMSupport + ) + set(LLVM_ENUM_ASM_PRINTERS "") set(LLVM_ENUM_ASM_PARSERS "") set(LLVM_ENUM_DISASSEMBLERS "") diff --git a/llvm/lib/Target/CellSPU/CMakeLists.txt b/llvm/lib/Target/CellSPU/CMakeLists.txt index 20ecb9b60e4..c16e53cdfe4 100644 --- a/llvm/lib/Target/CellSPU/CMakeLists.txt +++ b/llvm/lib/Target/CellSPU/CMakeLists.txt @@ -23,5 +23,17 @@ add_llvm_target(CellSPUCodeGen SPUNopFiller.cpp ) +add_llvm_library_dependencies(LLVMCellSPUCodeGen + LLVMAsmPrinter + LLVMCellSPUDesc + LLVMCellSPUInfo + LLVMCodeGen + LLVMCore + LLVMMC + LLVMSelectionDAG + LLVMSupport + LLVMTarget + ) + add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) diff --git a/llvm/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt index 7435e93fe03..d41fe934e2c 100644 --- a/llvm/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt @@ -2,4 +2,10 @@ add_llvm_library(LLVMCellSPUDesc SPUMCTargetDesc.cpp SPUMCAsmInfo.cpp ) + +add_llvm_library_dependencies(LLVMCellSPUDesc + LLVMCellSPUInfo + LLVMMC + ) + add_dependencies(LLVMCellSPUDesc CellSPUCommonTableGen) diff --git a/llvm/lib/Target/CellSPU/TargetInfo/CMakeLists.txt b/llvm/lib/Target/CellSPU/TargetInfo/CMakeLists.txt index 928d0fe97e0..4e0785a6d85 100644 --- a/llvm/lib/Target/CellSPU/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/CellSPU/TargetInfo/CMakeLists.txt @@ -4,4 +4,10 @@ add_llvm_library(LLVMCellSPUInfo CellSPUTargetInfo.cpp ) +add_llvm_library_dependencies(LLVMCellSPUInfo + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMCellSPUInfo CellSPUCodeGenTable_gen) diff --git a/llvm/lib/Target/CppBackend/CMakeLists.txt b/llvm/lib/Target/CppBackend/CMakeLists.txt index e9375599511..95b6058243d 100644 --- a/llvm/lib/Target/CppBackend/CMakeLists.txt +++ b/llvm/lib/Target/CppBackend/CMakeLists.txt @@ -2,4 +2,11 @@ add_llvm_target(CppBackend CPPBackend.cpp ) +add_llvm_library_dependencies(LLVMCppBackend + LLVMCore + LLVMCppBackendInfo + LLVMSupport + LLVMTarget + ) + add_subdirectory(TargetInfo) diff --git a/llvm/lib/Target/CppBackend/TargetInfo/CMakeLists.txt b/llvm/lib/Target/CppBackend/TargetInfo/CMakeLists.txt index edaf5d3cb18..7165d8fdf2c 100644 --- a/llvm/lib/Target/CppBackend/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/CppBackend/TargetInfo/CMakeLists.txt @@ -4,3 +4,7 @@ add_llvm_library(LLVMCppBackendInfo CppBackendTargetInfo.cpp ) +add_llvm_library_dependencies(LLVMCppBackendInfo + LLVMMC + LLVMTarget + ) diff --git a/llvm/lib/Target/MBlaze/AsmParser/CMakeLists.txt b/llvm/lib/Target/MBlaze/AsmParser/CMakeLists.txt index 18870cd1cf3..ec8f52a92cb 100644 --- a/llvm/lib/Target/MBlaze/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/MBlaze/AsmParser/CMakeLists.txt @@ -5,5 +5,12 @@ add_llvm_library(LLVMMBlazeAsmParser MBlazeAsmLexer.cpp MBlazeAsmParser.cpp ) -add_dependencies(LLVMMBlazeAsmParser MBlazeCommonTableGen) +add_llvm_library_dependencies(LLVMMBlazeAsmParser + LLVMMBlazeInfo + LLVMMC + LLVMMCParser + LLVMSupport + ) + +add_dependencies(LLVMMBlazeAsmParser MBlazeCommonTableGen) diff --git a/llvm/lib/Target/MBlaze/CMakeLists.txt b/llvm/lib/Target/MBlaze/CMakeLists.txt index ae0eca96a2a..20b3b036b0a 100644 --- a/llvm/lib/Target/MBlaze/CMakeLists.txt +++ b/llvm/lib/Target/MBlaze/CMakeLists.txt @@ -29,6 +29,19 @@ add_llvm_target(MBlazeCodeGen MBlazeELFWriterInfo.cpp ) +add_llvm_library_dependencies(LLVMMBlazeCodeGen + LLVMAsmPrinter + LLVMCodeGen + LLVMCore + LLVMMBlazeAsmPrinter + LLVMMBlazeDesc + LLVMMBlazeInfo + LLVMMC + LLVMSelectionDAG + LLVMSupport + LLVMTarget + ) + add_subdirectory(AsmParser) add_subdirectory(Disassembler) add_subdirectory(InstPrinter) diff --git a/llvm/lib/Target/MBlaze/Disassembler/CMakeLists.txt b/llvm/lib/Target/MBlaze/Disassembler/CMakeLists.txt index be2dce156d5..112c64c0263 100644 --- a/llvm/lib/Target/MBlaze/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/MBlaze/Disassembler/CMakeLists.txt @@ -13,4 +13,12 @@ set_property( ) endif() +add_llvm_library_dependencies(LLVMMBlazeDisassembler + LLVMMBlazeCodeGen + LLVMMBlazeDesc + LLVMMBlazeInfo + LLVMMC + LLVMSupport + ) + add_dependencies(LLVMMBlazeDisassembler MBlazeCommonTableGen) diff --git a/llvm/lib/Target/MBlaze/InstPrinter/CMakeLists.txt b/llvm/lib/Target/MBlaze/InstPrinter/CMakeLists.txt index 138a4e36349..aff0b3d992d 100644 --- a/llvm/lib/Target/MBlaze/InstPrinter/CMakeLists.txt +++ b/llvm/lib/Target/MBlaze/InstPrinter/CMakeLists.txt @@ -2,7 +2,12 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) add_llvm_library(LLVMMBlazeAsmPrinter - MBlazeInstPrinter.cpp + MBlazeInstPrinter.cpp + ) + +add_llvm_library_dependencies(LLVMMBlazeAsmPrinter + LLVMMC + LLVMSupport ) add_dependencies(LLVMMBlazeAsmPrinter MBlazeCommonTableGen) diff --git a/llvm/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt index 247dfe884ea..37871b6916c 100644 --- a/llvm/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt @@ -4,6 +4,12 @@ add_llvm_library(LLVMMBlazeDesc MBlazeMCCodeEmitter.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) diff --git a/llvm/lib/Target/MBlaze/TargetInfo/CMakeLists.txt b/llvm/lib/Target/MBlaze/TargetInfo/CMakeLists.txt index 40696f63c46..3425334d055 100644 --- a/llvm/lib/Target/MBlaze/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/MBlaze/TargetInfo/CMakeLists.txt @@ -5,4 +5,10 @@ add_llvm_library(LLVMMBlazeInfo MBlazeTargetInfo.cpp ) +add_llvm_library_dependencies(LLVMMBlazeInfo + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMMBlazeInfo MBlazeCodeGenTable_gen) diff --git a/llvm/lib/Target/MSP430/CMakeLists.txt b/llvm/lib/Target/MSP430/CMakeLists.txt index 3b6cf89d1ff..3840b03b978 100644 --- a/llvm/lib/Target/MSP430/CMakeLists.txt +++ b/llvm/lib/Target/MSP430/CMakeLists.txt @@ -22,6 +22,19 @@ add_llvm_target(MSP430CodeGen MSP430MCInstLower.cpp ) +add_llvm_library_dependencies(LLVMMSP430CodeGen + LLVMAsmPrinter + LLVMCodeGen + LLVMCore + LLVMMC + LLVMMSP430AsmPrinter + LLVMMSP430Desc + LLVMMSP430Info + LLVMSelectionDAG + LLVMSupport + LLVMTarget + ) + add_subdirectory(InstPrinter) add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) diff --git a/llvm/lib/Target/MSP430/InstPrinter/CMakeLists.txt b/llvm/lib/Target/MSP430/InstPrinter/CMakeLists.txt index 5ad01456a44..ce39d9517ef 100644 --- a/llvm/lib/Target/MSP430/InstPrinter/CMakeLists.txt +++ b/llvm/lib/Target/MSP430/InstPrinter/CMakeLists.txt @@ -3,4 +3,10 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/ add_llvm_library(LLVMMSP430AsmPrinter MSP430InstPrinter.cpp ) + +add_llvm_library_dependencies(LLVMMSP430AsmPrinter + LLVMMC + LLVMSupport + ) + add_dependencies(LLVMMSP430AsmPrinter MSP430CommonTableGen) diff --git a/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt index 45b9ae88954..04bd03e4946 100644 --- a/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt @@ -2,6 +2,11 @@ add_llvm_library(LLVMMSP430Desc MSP430MCTargetDesc.cpp MSP430MCAsmInfo.cpp ) -add_dependencies(LLVMMSP430Desc MSP430CommonTableGen) -target_link_libraries(LLVMMSP430Desc LLVMMSP430AsmPrinter) +add_llvm_library_dependencies(LLVMMSP430Desc + LLVMMC + LLVMMSP430AsmPrinter + LLVMMSP430Info + ) + +add_dependencies(LLVMMSP430Desc MSP430CommonTableGen) diff --git a/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt b/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt index 2d1aa9d4e5e..40f002313d5 100644 --- a/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt @@ -4,4 +4,10 @@ add_llvm_library(LLVMMSP430Info MSP430TargetInfo.cpp ) +add_llvm_library_dependencies(LLVMMSP430Info + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMMSP430Info MSP430CodeGenTable_gen) diff --git a/llvm/lib/Target/Mips/CMakeLists.txt b/llvm/lib/Target/Mips/CMakeLists.txt index 192ff1c93fe..9daa89e54fd 100644 --- a/llvm/lib/Target/Mips/CMakeLists.txt +++ b/llvm/lib/Target/Mips/CMakeLists.txt @@ -28,6 +28,19 @@ add_llvm_target(MipsCodeGen MipsSelectionDAGInfo.cpp ) +add_llvm_library_dependencies(LLVMMipsCodeGen + LLVMAsmPrinter + LLVMCodeGen + LLVMCore + LLVMMC + LLVMMipsAsmPrinter + LLVMMipsDesc + LLVMMipsInfo + LLVMSelectionDAG + LLVMSupport + LLVMTarget + ) + add_subdirectory(InstPrinter) add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) diff --git a/llvm/lib/Target/Mips/InstPrinter/CMakeLists.txt b/llvm/lib/Target/Mips/InstPrinter/CMakeLists.txt index e64d511f073..c45b35df8c1 100644 --- a/llvm/lib/Target/Mips/InstPrinter/CMakeLists.txt +++ b/llvm/lib/Target/Mips/InstPrinter/CMakeLists.txt @@ -3,4 +3,10 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/ add_llvm_library(LLVMMipsAsmPrinter MipsInstPrinter.cpp ) + +add_llvm_library_dependencies(LLVMMipsAsmPrinter + LLVMMC + LLVMSupport + ) + add_dependencies(LLVMMipsAsmPrinter MipsCommonTableGen) diff --git a/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt index 98760c5cd25..bb8aab1e64e 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt @@ -2,6 +2,12 @@ add_llvm_library(LLVMMipsDesc MipsMCTargetDesc.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) diff --git a/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt index 6e5d56ba4ae..32240e09dd4 100644 --- a/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt @@ -4,4 +4,10 @@ add_llvm_library(LLVMMipsInfo MipsTargetInfo.cpp ) +add_llvm_library_dependencies(LLVMMipsInfo + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMMipsInfo MipsCodeGenTable_gen) diff --git a/llvm/lib/Target/PTX/CMakeLists.txt b/llvm/lib/Target/PTX/CMakeLists.txt index 1eafb660303..bfbbe87281b 100644 --- a/llvm/lib/Target/PTX/CMakeLists.txt +++ b/llvm/lib/Target/PTX/CMakeLists.txt @@ -21,5 +21,18 @@ add_llvm_target(PTXCodeGen PTXTargetMachine.cpp ) +add_llvm_library_dependencies(LLVMPTXCodeGen + LLVMAnalysis + LLVMAsmPrinter + LLVMCodeGen + LLVMCore + LLVMMC + LLVMPTXDesc + LLVMPTXInfo + LLVMSelectionDAG + LLVMSupport + LLVMTarget + ) + add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) diff --git a/llvm/lib/Target/PTX/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/PTX/MCTargetDesc/CMakeLists.txt index ad787321e48..ddf08259031 100644 --- a/llvm/lib/Target/PTX/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/PTX/MCTargetDesc/CMakeLists.txt @@ -2,4 +2,11 @@ add_llvm_library(LLVMPTXDesc PTXMCTargetDesc.cpp PTXMCAsmInfo.cpp ) + +add_llvm_library_dependencies(LLVMPTXDesc + LLVMMC + LLVMPTXInfo + LLVMSupport + ) + add_dependencies(LLVMPTXDesc PTXCommonTableGen) diff --git a/llvm/lib/Target/PTX/TargetInfo/CMakeLists.txt b/llvm/lib/Target/PTX/TargetInfo/CMakeLists.txt index 4b09cf5ce09..8b399dfb5d1 100644 --- a/llvm/lib/Target/PTX/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/PTX/TargetInfo/CMakeLists.txt @@ -4,4 +4,10 @@ add_llvm_library(LLVMPTXInfo PTXTargetInfo.cpp ) +add_llvm_library_dependencies(LLVMPTXInfo + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMPTXInfo PTXCodeGenTable_gen) diff --git a/llvm/lib/Target/PowerPC/CMakeLists.txt b/llvm/lib/Target/PowerPC/CMakeLists.txt index 563a0bd95c1..ec0a9186f27 100644 --- a/llvm/lib/Target/PowerPC/CMakeLists.txt +++ b/llvm/lib/Target/PowerPC/CMakeLists.txt @@ -27,6 +27,20 @@ add_llvm_target(PowerPCCodeGen PPCSelectionDAGInfo.cpp ) +add_llvm_library_dependencies(LLVMPowerPCCodeGen + LLVMAnalysis + LLVMAsmPrinter + LLVMCodeGen + LLVMCore + LLVMMC + LLVMPowerPCAsmPrinter + LLVMPowerPCDesc + LLVMPowerPCInfo + LLVMSelectionDAG + LLVMSupport + LLVMTarget + ) + add_subdirectory(InstPrinter) add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) diff --git a/llvm/lib/Target/PowerPC/InstPrinter/CMakeLists.txt b/llvm/lib/Target/PowerPC/InstPrinter/CMakeLists.txt index dfdc2773614..1d857e2f48d 100644 --- a/llvm/lib/Target/PowerPC/InstPrinter/CMakeLists.txt +++ b/llvm/lib/Target/PowerPC/InstPrinter/CMakeLists.txt @@ -3,4 +3,10 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/ add_llvm_library(LLVMPowerPCAsmPrinter PPCInstPrinter.cpp ) + +add_llvm_library_dependencies(LLVMPowerPCAsmPrinter + LLVMMC + LLVMSupport + ) + add_dependencies(LLVMPowerPCAsmPrinter PowerPCCommonTableGen) diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt index 78e7ab5a808..c4041db8cf0 100644 --- a/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt @@ -5,6 +5,12 @@ add_llvm_library(LLVMPowerPCDesc PPCMCCodeEmitter.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) diff --git a/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt b/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt index 058d599a4af..aab91ae0360 100644 --- a/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt @@ -4,4 +4,10 @@ add_llvm_library(LLVMPowerPCInfo PowerPCTargetInfo.cpp ) +add_llvm_library_dependencies(LLVMPowerPCInfo + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMPowerPCInfo PowerPCCodeGenTable_gen) diff --git a/llvm/lib/Target/Sparc/CMakeLists.txt b/llvm/lib/Target/Sparc/CMakeLists.txt index 32bc421f0b8..0491229f61a 100644 --- a/llvm/lib/Target/Sparc/CMakeLists.txt +++ b/llvm/lib/Target/Sparc/CMakeLists.txt @@ -22,5 +22,17 @@ add_llvm_target(SparcCodeGen SparcSelectionDAGInfo.cpp ) +add_llvm_library_dependencies(LLVMSparcCodeGen + LLVMAsmPrinter + LLVMCodeGen + LLVMCore + LLVMMC + LLVMSelectionDAG + LLVMSparcDesc + LLVMSparcInfo + LLVMSupport + LLVMTarget + ) + add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) diff --git a/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt index a0525b67231..d3bdf0b503a 100644 --- a/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt @@ -2,4 +2,11 @@ add_llvm_library(LLVMSparcDesc SparcMCTargetDesc.cpp SparcMCAsmInfo.cpp ) + +add_llvm_library_dependencies(LLVMSparcDesc + LLVMMC + LLVMSparcInfo + LLVMSupport + ) + add_dependencies(LLVMSparcDesc SparcCommonTableGen) diff --git a/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt index 870b56a6ea1..e2dabb17490 100644 --- a/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt @@ -4,4 +4,10 @@ add_llvm_library(LLVMSparcInfo SparcTargetInfo.cpp ) +add_llvm_library_dependencies(LLVMSparcInfo + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMSparcInfo SparcCodeGenTable_gen) diff --git a/llvm/lib/Target/SystemZ/CMakeLists.txt b/llvm/lib/Target/SystemZ/CMakeLists.txt index bd8238ecac5..41b4c78bee2 100644 --- a/llvm/lib/Target/SystemZ/CMakeLists.txt +++ b/llvm/lib/Target/SystemZ/CMakeLists.txt @@ -20,5 +20,17 @@ add_llvm_target(SystemZCodeGen SystemZSelectionDAGInfo.cpp ) +add_llvm_library_dependencies(LLVMSystemZCodeGen + LLVMAsmPrinter + LLVMCodeGen + LLVMCore + LLVMMC + LLVMSelectionDAG + LLVMSupport + LLVMSystemZDesc + LLVMSystemZInfo + LLVMTarget + ) + add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt index 612a94ec92b..822df097a37 100644 --- a/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt @@ -2,6 +2,12 @@ add_llvm_library(LLVMSystemZDesc SystemZMCTargetDesc.cpp SystemZMCAsmInfo.cpp ) + +add_llvm_library_dependencies(LLVMSystemZDesc + LLVMMC + LLVMSystemZInfo + ) + add_dependencies(LLVMSystemZDesc SystemZCommonTableGen) # Hack: we need to include 'main' target directory to grab private headers diff --git a/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt b/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt index 743d8d322d0..12045bdc4d2 100644 --- a/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt @@ -4,4 +4,10 @@ add_llvm_library(LLVMSystemZInfo SystemZTargetInfo.cpp ) +add_llvm_library_dependencies(LLVMSystemZInfo + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMSystemZInfo SystemZCodeGenTable_gen) diff --git a/llvm/lib/Target/X86/AsmParser/CMakeLists.txt b/llvm/lib/Target/X86/AsmParser/CMakeLists.txt index 78b16f7cd34..94aca7abb2b 100644 --- a/llvm/lib/Target/X86/AsmParser/CMakeLists.txt +++ b/llvm/lib/Target/X86/AsmParser/CMakeLists.txt @@ -4,4 +4,13 @@ add_llvm_library(LLVMX86AsmParser X86AsmLexer.cpp X86AsmParser.cpp ) + +add_llvm_library_dependencies(LLVMX86AsmParser + LLVMMC + LLVMMCParser + LLVMSupport + LLVMX86Desc + LLVMX86Info + ) + add_dependencies(LLVMX86AsmParser X86CommonTableGen) diff --git a/llvm/lib/Target/X86/CMakeLists.txt b/llvm/lib/Target/X86/CMakeLists.txt index 60d3e26ccf7..1fd55128e22 100644 --- a/llvm/lib/Target/X86/CMakeLists.txt +++ b/llvm/lib/Target/X86/CMakeLists.txt @@ -51,6 +51,19 @@ endif() 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(Disassembler) add_subdirectory(InstPrinter) diff --git a/llvm/lib/Target/X86/Disassembler/CMakeLists.txt b/llvm/lib/Target/X86/Disassembler/CMakeLists.txt index 240f9b57489..4f570d56e60 100644 --- a/llvm/lib/Target/X86/Disassembler/CMakeLists.txt +++ b/llvm/lib/Target/X86/Disassembler/CMakeLists.txt @@ -4,6 +4,13 @@ add_llvm_library(LLVMX86Disassembler X86Disassembler.cpp X86DisassemblerDecoder.c ) + +add_llvm_library_dependencies(LLVMX86Disassembler + LLVMMC + LLVMSupport + LLVMX86Info + ) + # workaround for hanging compilation on MSVC9 and 10 if( MSVC_VERSION EQUAL 1400 OR MSVC_VERSION EQUAL 1500 OR MSVC_VERSION EQUAL 1600 ) set_property( @@ -11,4 +18,5 @@ set_property( PROPERTY COMPILE_FLAGS "/Od" ) endif() + add_dependencies(LLVMX86Disassembler X86CommonTableGen) diff --git a/llvm/lib/Target/X86/InstPrinter/CMakeLists.txt b/llvm/lib/Target/X86/InstPrinter/CMakeLists.txt index 3be627a1f0e..2a2b5dbb43d 100644 --- a/llvm/lib/Target/X86/InstPrinter/CMakeLists.txt +++ b/llvm/lib/Target/X86/InstPrinter/CMakeLists.txt @@ -5,4 +5,11 @@ add_llvm_library(LLVMX86AsmPrinter X86IntelInstPrinter.cpp X86InstComments.cpp ) + +add_llvm_library_dependencies(LLVMX86AsmPrinter + LLVMMC + LLVMSupport + LLVMX86Utils + ) + add_dependencies(LLVMX86AsmPrinter X86CommonTableGen) diff --git a/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt index 4e7995d76b8..87219120e2a 100644 --- a/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt @@ -5,9 +5,16 @@ add_llvm_library(LLVMX86Desc X86MCCodeEmitter.cpp X86MachObjectWriter.cpp ) + +add_llvm_library_dependencies(LLVMX86Desc + LLVMMC + LLVMSupport + LLVMX86AsmPrinter + LLVMX86AsmPrinter + LLVMX86Info + ) + add_dependencies(LLVMX86Desc X86CommonTableGen) # Hack: we need to include 'main' target directory to grab private headers include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..) - -target_link_libraries(LLVMX86Desc LLVMX86AsmPrinter) diff --git a/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt b/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt index 90be9f58cc7..8611c407005 100644 --- a/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt @@ -4,4 +4,10 @@ add_llvm_library(LLVMX86Info X86TargetInfo.cpp ) +add_llvm_library_dependencies(LLVMX86Info + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMX86Info X86CodeGenTable_gen) diff --git a/llvm/lib/Target/X86/Utils/CMakeLists.txt b/llvm/lib/Target/X86/Utils/CMakeLists.txt index 3ad5f991c86..30ed60bb4b4 100644 --- a/llvm/lib/Target/X86/Utils/CMakeLists.txt +++ b/llvm/lib/Target/X86/Utils/CMakeLists.txt @@ -3,4 +3,10 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/ add_llvm_library(LLVMX86Utils X86ShuffleDecode.cpp ) + +add_llvm_library_dependencies(LLVMX86Utils + LLVMCore + LLVMSupport + ) + add_dependencies(LLVMX86Utils X86CodeGenTable_gen) diff --git a/llvm/lib/Target/XCore/CMakeLists.txt b/llvm/lib/Target/XCore/CMakeLists.txt index aa4c45bdf1a..dce6e32b6f8 100644 --- a/llvm/lib/Target/XCore/CMakeLists.txt +++ b/llvm/lib/Target/XCore/CMakeLists.txt @@ -21,5 +21,17 @@ add_llvm_target(XCoreCodeGen XCoreSelectionDAGInfo.cpp ) +add_llvm_library_dependencies(LLVMXCoreCodeGen + LLVMAsmPrinter + LLVMCodeGen + LLVMCore + LLVMMC + LLVMSelectionDAG + LLVMSupport + LLVMTarget + LLVMXCoreDesc + LLVMXCoreInfo + ) + add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) diff --git a/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt index 4a69922f624..269822db711 100644 --- a/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt +++ b/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt @@ -2,6 +2,12 @@ add_llvm_library(LLVMXCoreDesc XCoreMCTargetDesc.cpp XCoreMCAsmInfo.cpp ) + +add_llvm_library_dependencies(LLVMXCoreDesc + LLVMMC + LLVMXCoreInfo + ) + add_dependencies(LLVMXCoreDesc XCoreCommonTableGen) # Hack: we need to include 'main' target directory to grab private headers diff --git a/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt b/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt index c147b8a66bc..b2d33499fbf 100644 --- a/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt +++ b/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt @@ -4,4 +4,10 @@ add_llvm_library(LLVMXCoreInfo XCoreTargetInfo.cpp ) +add_llvm_library_dependencies(LLVMXCoreInfo + LLVMMC + LLVMSupport + LLVMTarget + ) + add_dependencies(LLVMXCoreInfo XCoreCodeGenTable_gen) |