[TargetVersion] Only enable on RISC-V and AArch64 (#115991)
[llvm-project.git] / bolt / lib / Rewrite / CMakeLists.txt
blob5d114925f59b026d9f4f6141b31203f1cce490c3
1 set(LLVM_LINK_COMPONENTS
2   Core
3   DebugInfoDWARF
4   JITLink
5   MC
6   Object
7   Support
8   DWARFLinker
9   DWARFLinkerClassic
10   AsmPrinter
11   TargetParser
12   )
14 add_llvm_library(LLVMBOLTRewrite
15   BinaryPassManager.cpp
16   BoltDiff.cpp
17   DWARFRewriter.cpp
18   ExecutableFileMemoryManager.cpp
19   JITLinkLinker.cpp
20   LinuxKernelRewriter.cpp
21   MachORewriteInstance.cpp
22   MetadataManager.cpp
23   BuildIDRewriter.cpp
24   PseudoProbeRewriter.cpp
25   RewriteInstance.cpp
26   SDTRewriter.cpp
28   DISABLE_LLVM_LINK_LLVM_DYLIB
30   LINK_LIBS
31   ${LLVM_PTHREAD_LIB}
32   )
34 target_link_libraries(LLVMBOLTRewrite
35   PRIVATE
36   LLVMBOLTCore
37   LLVMBOLTPasses
38   LLVMBOLTProfile
39   LLVMBOLTRuntimeLibs
40   LLVMBOLTUtils
41   )
43 foreach (tgt ${BOLT_TARGETS_TO_BUILD})
44   target_link_libraries(LLVMBOLTRewrite PRIVATE LLVMBOLTTarget${tgt})
45   string(TOUPPER "${tgt}" upper)
46   target_compile_definitions(LLVMBOLTRewrite PRIVATE ${upper}_AVAILABLE)
47 endforeach()