File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,9 +4,6 @@ set(BOLT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
44set (BOLT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} )
55set (CMAKE_CXX_STANDARD 17)
66
7- # Add path for custom modules.
8- list (INSERT CMAKE_MODULE_PATH 0 "${BOLT_SOURCE_DIR} /cmake/modules" )
9-
107# Determine default set of targets to build -- the intersection of
118# those BOLT supports and those LLVM is targeting.
129set (BOLT_TARGETS_TO_BUILD_all "AArch64;X86" )
@@ -114,15 +111,6 @@ endif()
114111
115112find_program (GNU_LD_EXECUTABLE NAMES ${LLVM_DEFAULT_TARGET_TRIPLE} -ld.bfd ld.bfd DOC "GNU ld" )
116113
117- include (AddBOLT )
118-
119- option (BOLT_BUILD_TOOLS
120- "Build the BOLT tools. If OFF, just generate build targets." ON )
121-
122- add_custom_target (bolt )
123- set_target_properties (bolt PROPERTIES FOLDER "BOLT" )
124- add_llvm_install_targets (install -bolt DEPENDS bolt COMPONENT bolt )
125-
126114include_directories (
127115 ${CMAKE_CURRENT_SOURCE_DIR} /include
128116 ${CMAKE_CURRENT_BINARY_DIR} /include
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ list(APPEND BOLT_TEST_DEPS
3737 lld
3838 llvm-config
3939 llvm-bolt
40+ llvm-boltdiff
4041 llvm-bolt-heatmap
4142 llvm-bat-dump
4243 llvm-dwarfdump
@@ -51,6 +52,7 @@ list(APPEND BOLT_TEST_DEPS
5152 llvm-objcopy
5253 merge-fdata
5354 not
55+ perf2bolt
5456 split-file
5557 yaml2obj
5658 )
Original file line number Diff line number Diff line change @@ -2,6 +2,16 @@ set(BOLT_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
22 "Path for binary subdirectory (defaults to '${CMAKE_INSTALL_BINDIR} ')" )
33mark_as_advanced (BOLT_TOOLS_INSTALL_DIR )
44
5+ # Move these macros to AddBolt if such a CMake module is ever created.
6+
7+ macro (add_bolt_tool name )
8+ llvm_add_tool (BOLT ${ARGV} )
9+ endmacro ()
10+
11+ macro (add_bolt_tool_symlink name )
12+ llvm_add_tool_symlink (BOLT ${ARGV} )
13+ endmacro ()
14+
515add_subdirectory (driver )
616add_subdirectory (llvm-bolt-fuzzer )
717add_subdirectory (bat-dump )
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ set(LLVM_LINK_COMPONENTS
33 Support
44 )
55
6- add_bolt_executable (llvm-bat-dump
6+ add_llvm_tool (llvm-bat-dump
77 bat-dump.cpp
88
99 DISABLE_LLVM_LINK_LLVM_DYLIB
@@ -13,3 +13,5 @@ target_link_libraries(llvm-bat-dump
1313 PRIVATE
1414 LLVMBOLTProfile
1515 )
16+
17+ set_target_properties (llvm-bat-dump PROPERTIES FOLDER "BOLT" )
Original file line number Diff line number Diff line change @@ -30,6 +30,22 @@ target_link_libraries(llvm-bolt
3030add_bolt_tool_symlink (perf2bolt llvm-bolt )
3131add_bolt_tool_symlink (llvm-boltdiff llvm-bolt )
3232
33- add_dependencies (bolt llvm-bolt )
33+ set (BOLT_DEPENDS
34+ llvm-bolt
35+ perf2bolt
36+ llvm-boltdiff
37+ )
38+
39+ add_custom_target (bolt DEPENDS ${BOLT_DEPENDS} )
40+ install (PROGRAMS
41+ ${CMAKE_BINARY_DIR} /bin/llvm-bolt
42+ ${CMAKE_BINARY_DIR} /bin/perf2bolt
43+ ${CMAKE_BINARY_DIR} /bin/llvm-boltdiff
44+ DESTINATION ${CMAKE_INSTALL_BINDIR}
45+ COMPONENT bolt
46+ )
47+ add_llvm_install_targets (install -bolt DEPENDS bolt COMPONENT bolt )
48+ set_target_properties (bolt PROPERTIES FOLDER "BOLT" )
49+ set_target_properties (install -bolt PROPERTIES FOLDER "BOLT" )
3450
35- include_directories (${BOLT_SOURCE_DIR} /lib )
51+ include_directories ( ${BOLT_SOURCE_DIR} /lib )
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ target_link_libraries(llvm-bolt-heatmap
1717 LLVMBOLTUtils
1818 )
1919
20- add_dependencies ( bolt llvm-bolt-heatmap )
20+ set_target_properties ( llvm-bolt-heatmap PROPERTIES FOLDER "BOLT" )
Original file line number Diff line number Diff line change @@ -8,8 +8,14 @@ add_bolt_tool(merge-fdata
88 DEPENDS
99 intrinsics_gen
1010)
11+ set_target_properties (merge-fdata PROPERTIES FOLDER "BOLT" )
1112
1213add_dependencies (bolt merge-fdata )
14+ install (PROGRAMS
15+ ${CMAKE_BINARY_DIR} /bin/merge-fdata
16+ DESTINATION ${CMAKE_INSTALL_BINDIR}
17+ COMPONENT bolt
18+ )
1319
1420# Emit relocations for BOLT meta test (bolt/test/runtime/meta-merge-fdata.test)
1521if (BOLT_INCLUDE_TESTS AND UNIX AND NOT APPLE )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
66
77set (PACKAGE_VENDOR Fuchsia CACHE STRING "" )
88
9- set (_FUCHSIA_ENABLE_PROJECTS "bolt; clang;clang-tools-extra;lld;llvm;polly" )
9+ set (_FUCHSIA_ENABLE_PROJECTS "clang;clang-tools-extra;lld;llvm;polly" )
1010set (LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "" )
1111
1212set (LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "" )
@@ -329,7 +329,6 @@ set(LLVM_TOOLCHAIN_TOOLS
329329 CACHE STRING "" )
330330
331331set (LLVM_Toolchain_DISTRIBUTION_COMPONENTS
332- bolt
333332 clang
334333 lld
335334 clang-apply-replacements
Original file line number Diff line number Diff line change @@ -2121,7 +2121,7 @@ function(llvm_install_symlink project name dest)
21212121 if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
21222122 add_llvm_install_targets (install -${name}
21232123 DEPENDS ${name} ${dest}
2124- COMPONENT ${component }
2124+ COMPONENT ${name }
21252125 SYMLINK ${dest} )
21262126 endif ()
21272127endfunction ()
You can’t perform that action at this time.
0 commit comments