[release] Use threaded compression with xz
[llvm-project.git] / bolt / tools / driver / CMakeLists.txt
blobe56be15dbcff6ea8258d1e5bd49e60452fdb308a
1 set(LLVM_LINK_COMPONENTS
2   ${LLVM_TARGETS_TO_BUILD}
3   MC
4   Object
5   Support
6   )
8 if (BOLT_ENABLE_RUNTIME)
9   set(BOLT_DRIVER_DEPS "bolt_rt")
10 else()
11   set(BOLT_DRIVER_DEPS "")
12 endif()
14 add_bolt_tool(llvm-bolt
15   llvm-bolt.cpp
17   DEPENDS
18   ${BOLT_DRIVER_DEPS}
19   )
21 target_link_libraries(llvm-bolt
22   PRIVATE
23   LLVMBOLTProfile
24   LLVMBOLTRewrite
25   LLVMBOLTUtils
26   )
28 add_bolt_tool_symlink(perf2bolt llvm-bolt)
29 add_bolt_tool_symlink(llvm-boltdiff llvm-bolt)
31 set(BOLT_DEPENDS
32   llvm-bolt
33   perf2bolt
34   llvm-boltdiff
35   )
37 add_custom_target(bolt DEPENDS ${BOLT_DEPENDS})
38 install(PROGRAMS
39   ${CMAKE_BINARY_DIR}/bin/llvm-bolt
40   ${CMAKE_BINARY_DIR}/bin/perf2bolt
41   ${CMAKE_BINARY_DIR}/bin/llvm-boltdiff
42   DESTINATION ${CMAKE_INSTALL_BINDIR}
43   COMPONENT bolt
44   )
45 add_llvm_install_targets(install-bolt DEPENDS bolt COMPONENT bolt)
46 set_target_properties(bolt PROPERTIES FOLDER "BOLT")
47 set_target_properties(install-bolt PROPERTIES FOLDER "BOLT")
49 include_directories( ${BOLT_SOURCE_DIR}/lib )