2008-09-22 09:08:49 +08:00
|
|
|
add_llvm_library(LLVMTarget
|
2010-01-17 06:23:09 +08:00
|
|
|
Mangler.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
SubtargetFeature.cpp
|
|
|
|
Target.cpp
|
2010-12-10 15:39:47 +08:00
|
|
|
TargetAsmInfo.cpp
|
2010-01-22 09:58:44 +08:00
|
|
|
TargetAsmLexer.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
TargetData.cpp
|
2009-06-12 06:13:00 +08:00
|
|
|
TargetELFWriterInfo.cpp
|
2011-01-10 20:39:23 +08:00
|
|
|
TargetFrameLowering.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
TargetInstrInfo.cpp
|
2009-07-22 01:43:20 +08:00
|
|
|
TargetIntrinsicInfo.cpp
|
2011-02-19 05:50:34 +08:00
|
|
|
TargetLibraryInfo.cpp
|
2009-07-28 11:13:23 +08:00
|
|
|
TargetLoweringObjectFile.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
TargetMachine.cpp
|
|
|
|
TargetRegisterInfo.cpp
|
|
|
|
TargetSubtarget.cpp
|
|
|
|
)
|
2011-02-19 06:06:14 +08:00
|
|
|
|
|
|
|
set(LLVM_ENUM_ASM_PRINTERS "")
|
|
|
|
set(LLVM_ENUM_ASM_PARSERS "")
|
|
|
|
set(LLVM_ENUM_DISASSEMBLERS "")
|
|
|
|
foreach(t ${LLVM_TARGETS_TO_BUILD})
|
|
|
|
message(STATUS "Targeting ${t}")
|
|
|
|
add_subdirectory(${t})
|
|
|
|
set( td ${LLVM_MAIN_SRC_DIR}/lib/Target/${t} )
|
|
|
|
file(GLOB asmp_file "${td}/*AsmPrinter.cpp")
|
|
|
|
if( asmp_file )
|
|
|
|
set(LLVM_ENUM_ASM_PRINTERS
|
|
|
|
"${LLVM_ENUM_ASM_PRINTERS}LLVM_ASM_PRINTER(${t})\n")
|
|
|
|
endif()
|
|
|
|
if( EXISTS ${td}/AsmParser/CMakeLists.txt )
|
|
|
|
set(LLVM_ENUM_ASM_PARSERS
|
|
|
|
"${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n")
|
|
|
|
endif()
|
|
|
|
if( EXISTS ${td}/Disassembler/CMakeLists.txt )
|
|
|
|
set(LLVM_ENUM_DISASSEMBLERS
|
|
|
|
"${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n")
|
|
|
|
endif()
|
|
|
|
endforeach(t)
|
|
|
|
|
|
|
|
# Produce llvm/Config/AsmPrinters.def
|
|
|
|
configure_file(
|
|
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmPrinters.def.in
|
|
|
|
${LLVM_BINARY_DIR}/include/llvm/Config/AsmPrinters.def
|
|
|
|
)
|
|
|
|
|
|
|
|
# Produce llvm/Config/AsmParsers.def
|
|
|
|
configure_file(
|
|
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmParsers.def.in
|
|
|
|
${LLVM_BINARY_DIR}/include/llvm/Config/AsmParsers.def
|
|
|
|
)
|
|
|
|
|
|
|
|
# Produce llvm/Config/Disassemblers.def
|
|
|
|
configure_file(
|
|
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Disassemblers.def.in
|
|
|
|
${LLVM_BINARY_DIR}/include/llvm/Config/Disassemblers.def
|
|
|
|
)
|