Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / lib / Rewrite / CMakeLists.txt
blobb0e2b7f46bef4ca4fa8c21263fd8993ee7f59e2d
1 set(LLVM_LINK_COMPONENTS
2   DebugInfoDWARF
3   DWP
4   JITLink
5   MC
6   Object
7   Support
8   DWARFLinker
9   AsmPrinter
10   TargetParser
11   )
13 add_llvm_library(LLVMBOLTRewrite
14   BinaryPassManager.cpp
15   BoltDiff.cpp
16   DWARFRewriter.cpp
17   ExecutableFileMemoryManager.cpp
18   JITLinkLinker.cpp
19   LinuxKernelRewriter.cpp
20   MachORewriteInstance.cpp
21   MetadataManager.cpp
22   PseudoProbeRewriter.cpp
23   RewriteInstance.cpp
24   SDTRewriter.cpp
26   DISABLE_LLVM_LINK_LLVM_DYLIB
28   LINK_LIBS
29   ${LLVM_PTHREAD_LIB}
30   )
32 target_link_libraries(LLVMBOLTRewrite
33   PRIVATE
34   LLVMBOLTCore
35   LLVMBOLTPasses
36   LLVMBOLTProfile
37   LLVMBOLTRuntimeLibs
38   LLVMBOLTUtils
39   )
41 foreach (tgt ${BOLT_TARGETS_TO_BUILD})
42   target_link_libraries(LLVMBOLTRewrite PRIVATE LLVMBOLTTarget${tgt})
43   string(TOUPPER "${tgt}" upper)
44   target_compile_definitions(LLVMBOLTRewrite PRIVATE ${upper}_AVAILABLE)
45 endforeach()