From: Amir Ayupov Date: Wed, 4 Jan 2023 01:39:55 +0000 (-0800) Subject: [BOLT][CMake] Add merge-fdata to bolt component X-Git-Tag: upstream/17.0.6~22213 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be08bb775533cd7240b8766f942e390c6c325386;p=platform%2Fupstream%2Fllvm.git [BOLT][CMake] Add merge-fdata to bolt component Build and install `merge-fdata` tool as part of `bolt` component: ``` $ ninja bolt # builds llvm-bolt, perf2bolt and merge-fdata $ cmake --install . --component bolt --prefix $HOME/test-install-bolt -- Install configuration: "Release" -- Install configuration: "Release" -- Installing: /home/aaupov/test-install-bolt/lib/libbolt_rt_instr.a -- Installing: /home/aaupov/test-install-bolt/lib/libbolt_rt_hugify.a -- Installing: /home/aaupov/test-install-bolt/lib/libbolt_rt_instr_osx.a -- Installing: /home/aaupov/test-install-bolt/bin/llvm-bolt -- Installing: /home/aaupov/test-install-bolt/bin/perf2bolt -- Installing: /home/aaupov/test-install-bolt/bin/llvm-boltdiff -- Installing: /home/aaupov/test-install-bolt/bin/merge-fdata ``` Fixes #57249. Reviewed By: #bolt, rafauler Differential Revision: https://reviews.llvm.org/D139972 --- diff --git a/bolt/tools/merge-fdata/CMakeLists.txt b/bolt/tools/merge-fdata/CMakeLists.txt index 4bd2b52..9405acb 100644 --- a/bolt/tools/merge-fdata/CMakeLists.txt +++ b/bolt/tools/merge-fdata/CMakeLists.txt @@ -10,6 +10,13 @@ add_bolt_tool(merge-fdata ) set_target_properties(merge-fdata PROPERTIES FOLDER "BOLT") +add_dependencies(bolt merge-fdata) +install(PROGRAMS + ${CMAKE_BINARY_DIR}/bin/merge-fdata + DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT bolt + ) + # Emit relocations for BOLT meta test (bolt/test/runtime/meta-merge-fdata.test) if (BOLT_INCLUDE_TESTS AND UNIX AND NOT APPLE) target_link_options(merge-fdata PRIVATE LINKER:--emit-relocs)