2021-10-09 02:47:10 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
|
|
${LLVM_TARGETS_TO_BUILD}
|
|
|
|
BOLTProfile
|
|
|
|
BOLTRewrite
|
|
|
|
BOLTUtils
|
|
|
|
MC
|
|
|
|
Object
|
|
|
|
Support
|
|
|
|
)
|
|
|
|
|
2021-10-27 03:26:23 +08:00
|
|
|
if (BOLT_ENABLE_RUNTIME)
|
|
|
|
set(BOLT_DRIVER_DEPS "bolt_rt")
|
|
|
|
else()
|
|
|
|
set(BOLT_DRIVER_DEPS "")
|
|
|
|
endif()
|
|
|
|
|
2021-10-09 02:47:10 +08:00
|
|
|
add_llvm_tool(llvm-bolt
|
|
|
|
llvm-bolt.cpp
|
|
|
|
|
|
|
|
DEPENDS
|
2021-10-27 03:26:23 +08:00
|
|
|
${BOLT_DRIVER_DEPS}
|
2021-10-09 02:47:10 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
add_llvm_tool_symlink(perf2bolt llvm-bolt)
|
|
|
|
add_llvm_tool_symlink(llvm-boltdiff llvm-bolt)
|
|
|
|
|
2021-12-16 02:16:58 +08:00
|
|
|
set(BOLT_DEPENDS
|
|
|
|
llvm-bolt
|
|
|
|
perf2bolt
|
|
|
|
llvm-boltdiff
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_target(bolt DEPENDS ${BOLT_DEPENDS})
|
|
|
|
install(PROGRAMS
|
|
|
|
${CMAKE_BINARY_DIR}/bin/llvm-bolt
|
|
|
|
${CMAKE_BINARY_DIR}/bin/perf2bolt
|
|
|
|
${CMAKE_BINARY_DIR}/bin/llvm-boltdiff
|
|
|
|
TYPE BIN
|
|
|
|
COMPONENT bolt
|
|
|
|
)
|
|
|
|
add_llvm_install_targets(install-bolt DEPENDS bolt COMPONENT bolt)
|
2021-12-23 21:59:35 +08:00
|
|
|
set_target_properties(bolt PROPERTIES FOLDER "BOLT")
|
|
|
|
set_target_properties(install-bolt PROPERTIES FOLDER "BOLT")
|
2021-12-16 02:16:58 +08:00
|
|
|
|
2021-10-09 02:47:10 +08:00
|
|
|
include_directories( ${BOLT_SOURCE_DIR}/lib )
|