[PATCH] D139972: [BOLT][CMake] Add merge-fdata to bolt component

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 14:27:42 PST 2022


Amir created this revision.
Amir added a reviewer: bolt.
Herald added a reviewer: rafauler.
Herald added subscribers: treapster, ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139972

Files:
  bolt/tools/merge-fdata/CMakeLists.txt


Index: bolt/tools/merge-fdata/CMakeLists.txt
===================================================================
--- bolt/tools/merge-fdata/CMakeLists.txt
+++ bolt/tools/merge-fdata/CMakeLists.txt
@@ -10,6 +10,13 @@
 )
 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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139972.482628.patch
Type: text/x-patch
Size: 633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221213/61a12318/attachment.bin>


More information about the llvm-commits mailing list