mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
6d857ca4d7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125968 91177308-0d34-0410-b5e6-96231b3b80d8
68 lines
1.9 KiB
CMake
68 lines
1.9 KiB
CMake
add_llvm_library(LLVMTarget
|
|
Mangler.cpp
|
|
SubtargetFeature.cpp
|
|
Target.cpp
|
|
TargetAsmInfo.cpp
|
|
TargetAsmLexer.cpp
|
|
TargetData.cpp
|
|
TargetELFWriterInfo.cpp
|
|
TargetFrameLowering.cpp
|
|
TargetInstrInfo.cpp
|
|
TargetIntrinsicInfo.cpp
|
|
TargetLibraryInfo.cpp
|
|
TargetLoweringObjectFile.cpp
|
|
TargetMachine.cpp
|
|
TargetRegisterInfo.cpp
|
|
TargetSubtarget.cpp
|
|
)
|
|
|
|
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})
|
|
add_subdirectory(${t}/TargetInfo)
|
|
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}/InstPrinter/CMakeLists.txt )
|
|
add_subdirectory(${t}/InstPrinter)
|
|
endif()
|
|
if( EXISTS ${td}/AsmParser/CMakeLists.txt )
|
|
add_subdirectory(${t}/AsmParser)
|
|
set(LLVM_ENUM_ASM_PARSERS
|
|
"${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n")
|
|
endif()
|
|
if( EXISTS ${td}/Disassembler/CMakeLists.txt )
|
|
add_subdirectory(${t}/Disassembler)
|
|
set(LLVM_ENUM_DISASSEMBLERS
|
|
"${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n")
|
|
endif()
|
|
if( EXISTS ${td}/Utils/CMakeLists.txt )
|
|
add_subdirectory(${td}/Utils)
|
|
endif()
|
|
set(CURRENT_LLVM_TARGET)
|
|
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
|
|
)
|