xref: /llvm-project/bolt/lib/Target/RISCV/CMakeLists.txt (revision e7244d8659f1ee7b6dcf8fc90e33d81cda178f45)
1f8730293SJob Noormanset(LLVM_LINK_COMPONENTS
2f8730293SJob Noorman  MC
3f8730293SJob Noorman  Support
4f8730293SJob Noorman  RISCVDesc
5f8730293SJob Noorman  )
6f8730293SJob Noorman
7abc2eae6STristan Rossif(BOLT_BUILT_STANDALONE)
8abc2eae6STristan Ross  # tablegen, copied from llvm/lib/Target/RISCV/CMakeLists.txt
9abc2eae6STristan Ross  set(LLVM_TARGET_DEFINITIONS ${LLVM_MAIN_SRC_DIR}/lib/Target/RISCV/RISCV.td)
10abc2eae6STristan Ross  list(APPEND LLVM_TABLEGEN_FLAGS -I ${LLVM_MAIN_SRC_DIR}/lib/Target/RISCV)
11abc2eae6STristan Ross  tablegen(LLVM RISCVGenInstrInfo.inc -gen-instr-info)
12abc2eae6STristan Ross  tablegen(LLVM RISCVGenRegisterInfo.inc -gen-register-info)
13abc2eae6STristan Ross  tablegen(LLVM RISCVGenSearchableTables.inc -gen-searchable-tables)
14abc2eae6STristan Ross  tablegen(LLVM RISCVGenSubtargetInfo.inc -gen-subtarget)
15abc2eae6STristan Ross
16abc2eae6STristan Ross  add_public_tablegen_target(RISCVCommonTableGen)
17abc2eae6STristan Ross  include_directories(${CMAKE_CURRENT_BINARY_DIR})
18abc2eae6STristan Rossendif()
19abc2eae6STristan Ross
20f8730293SJob Noormanadd_llvm_library(LLVMBOLTTargetRISCV
21f8730293SJob Noorman  RISCVMCPlusBuilder.cpp
22f8730293SJob Noorman
23*e7244d86SNikita Popov  NO_EXPORT
24f8730293SJob Noorman  DISABLE_LLVM_LINK_LLVM_DYLIB
25f8730293SJob Noorman
26f8730293SJob Noorman  DEPENDS
27f8730293SJob Noorman  RISCVCommonTableGen
28f8730293SJob Noorman  )
29f8730293SJob Noorman
30f8730293SJob Noormantarget_link_libraries(LLVMBOLTTargetRISCV PRIVATE LLVMBOLTCore)
31f8730293SJob Noorman
32f8730293SJob Noormaninclude_directories(
33f8730293SJob Noorman  ${LLVM_MAIN_SRC_DIR}/lib/Target/RISCV
34f8730293SJob Noorman  ${LLVM_BINARY_DIR}/lib/Target/RISCV
35f8730293SJob Noorman  )
36