[llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)
[llvm-project.git] / bolt / lib / Rewrite / CMakeLists.txt
blob6890f52e2b28bbf8a3bc4c9b569b157a4c432f68
1 set(LLVM_LINK_COMPONENTS
2   DebugInfoDWARF
3   DWP
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   PseudoProbeRewriter.cpp
24   RewriteInstance.cpp
25   SDTRewriter.cpp
27   DISABLE_LLVM_LINK_LLVM_DYLIB
29   LINK_LIBS
30   ${LLVM_PTHREAD_LIB}
31   )
33 target_link_libraries(LLVMBOLTRewrite
34   PRIVATE
35   LLVMBOLTCore
36   LLVMBOLTPasses
37   LLVMBOLTProfile
38   LLVMBOLTRuntimeLibs
39   LLVMBOLTUtils
40   )
42 foreach (tgt ${BOLT_TARGETS_TO_BUILD})
43   target_link_libraries(LLVMBOLTRewrite PRIVATE LLVMBOLTTarget${tgt})
44   string(TOUPPER "${tgt}" upper)
45   target_compile_definitions(LLVMBOLTRewrite PRIVATE ${upper}_AVAILABLE)
46 endforeach()