[LLD][COFF] Emit tail merge pdata for delay load thunks on ARM64EC (#116810)
[llvm-project.git] / bolt / cmake / modules / AddBOLT.cmake
blobc7ac662c6b12176ded54ec8df829854fb834d74e
1 include(GNUInstallDirs)
2 include(LLVMDistributionSupport)
4 macro(add_bolt_executable name)
5   add_llvm_executable(${name} ${ARGN})
6 endmacro()
8 macro(add_bolt_tool name)
9   if (NOT BOLT_BUILD_TOOLS)
10     set(EXCLUDE_FROM_ALL ON)
11   endif()
13   add_bolt_executable(${name} ${ARGN})
15   if (BOLT_BUILD_TOOLS)
16     get_target_export_arg(${name} BOLT export_to_bolttargets)
17     install(TARGETS ${name}
18       ${export_to_bolttargets}
19       RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
20       COMPONENT bolt)
22     if(NOT LLVM_ENABLE_IDE)
23       add_llvm_install_targets(install-${name}
24                                DEPENDS ${name}
25                                COMPONENT bolt)
26     endif()
27     set_property(GLOBAL APPEND PROPERTY BOLT_EXPORTS ${name})
28   endif()
29 endmacro()
31 macro(add_bolt_tool_symlink name dest)
32   llvm_add_tool_symlink(BOLT ${name} ${dest} ALWAYS_GENERATE)
33   # Always generate install targets
34   llvm_install_symlink(BOLT ${name} ${dest} ALWAYS_GENERATE COMPONENT bolt)
35 endmacro()