diff --git a/llvm/lib/Target/CMakeLists.txt b/llvm/lib/Target/CMakeLists.txt --- a/llvm/lib/Target/CMakeLists.txt +++ b/llvm/lib/Target/CMakeLists.txt @@ -2,6 +2,8 @@ list(APPEND LLVM_TABLEGEN_FLAGS -I ${LLVM_MAIN_SRC_DIR}/lib/Target) +set(LLVM_TABLEGEN_EXE llvm-cg-tblgen) + add_llvm_component_library(LLVMTarget Target.cpp TargetIntrinsicInfo.cpp diff --git a/llvm/unittests/TableGen/CMakeLists.txt b/llvm/unittests/TableGen/CMakeLists.txt --- a/llvm/unittests/TableGen/CMakeLists.txt +++ b/llvm/unittests/TableGen/CMakeLists.txt @@ -5,6 +5,8 @@ set(LLVM_TARGET_DEFINITIONS Automata.td) +set(LLVM_TABLEGEN_EXE llvm-cg-tblgen) + tablegen(LLVM AutomataTables.inc -gen-searchable-tables) tablegen(LLVM AutomataAutomata.inc -gen-automata) add_public_tablegen_target(AutomataTestTableGen) diff --git a/llvm/utils/TableGen/CMakeLists.txt b/llvm/utils/TableGen/CMakeLists.txt --- a/llvm/utils/TableGen/CMakeLists.txt +++ b/llvm/utils/TableGen/CMakeLists.txt @@ -2,20 +2,25 @@ set(LLVM_LINK_COMPONENTS Support) -add_tablegen(llvm-tblgen LLVM +add_llvm_library(TableGenCommon EXCLUDE_FROM_ALL + CodeGenIntrinsics.cpp + SDNodeProperties.cpp + TableGen.cpp + PARTIAL_SOURCES_INTENDED + ) + +add_tablegen(llvm-cg-tblgen LLVM DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" EXPORT LLVM AsmMatcherEmitter.cpp AsmWriterEmitter.cpp AsmWriterInst.cpp - Attributes.cpp CallingConvEmitter.cpp CodeEmitterGen.cpp CodeGenDAGPatterns.cpp CodeGenHwModes.cpp CodeGenInstAlias.cpp CodeGenInstruction.cpp - CodeGenIntrinsics.cpp CodeGenMapTable.cpp CodeGenRegisters.cpp CodeGenSchedule.cpp @@ -28,7 +33,6 @@ DecoderEmitter.cpp DFAEmitter.cpp DFAPacketizerEmitter.cpp - DirectiveEmitter.cpp DisassemblerEmitter.cpp DXILEmitter.cpp ExegesisEmitter.cpp @@ -38,21 +42,14 @@ InfoByHwMode.cpp InstrInfoEmitter.cpp InstrDocsEmitter.cpp - IntrinsicEmitter.cpp - OptEmitter.cpp - OptParserEmitter.cpp - OptRSTEmitter.cpp PredicateExpander.cpp PseudoLoweringEmitter.cpp CompressInstEmitter.cpp RegisterBankEmitter.cpp RegisterInfoEmitter.cpp - RISCVTargetDefEmitter.cpp - SDNodeProperties.cpp SearchableTableEmitter.cpp SubtargetEmitter.cpp SubtargetFeatureInfo.cpp - TableGen.cpp Types.cpp VarLenCodeEmitterGen.cpp X86DisassemblerTables.cpp @@ -62,7 +59,23 @@ X86ModRMFilters.cpp X86RecognizableInstr.cpp WebAssemblyDisassemblerEmitter.cpp + PARTIAL_SOURCES_INTENDED + $ + ) +target_link_libraries(llvm-cg-tblgen PRIVATE LLVMTableGenGlobalISel) +set_target_properties(llvm-cg-tblgen PROPERTIES FOLDER "Tablegenning") + +add_tablegen(llvm-tblgen LLVM + DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" + EXPORT LLVM + Attributes.cpp CTagsEmitter.cpp + DirectiveEmitter.cpp + IntrinsicEmitter.cpp + OptEmitter.cpp + OptParserEmitter.cpp + OptRSTEmitter.cpp + RISCVTargetDefEmitter.cpp + $ ) -target_link_libraries(llvm-tblgen PRIVATE LLVMTableGenGlobalISel) set_target_properties(llvm-tblgen PROPERTIES FOLDER "Tablegenning")