[PATCH] D64532: [CMake] Support separate installation of InstrProfData.inc
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 14:42:44 PDT 2019
phosek created this revision.
phosek added reviewers: beanz, smeenai, davidxl.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
This header fragment is useful on its own for any consumer that wants
to use custom instruction profile runtime with the LLVM instrumentation.
The concrete use case is in Fuchsia's kernel where we want to use
instruction profile instrumentation, but we cannot use the compiler-rt
runtime because it's not designed for use in the kernel environment.
This change allows installing this header as a separate distribution
component without having to install all LLVM headers.
Repository:
rL LLVM
https://reviews.llvm.org/D64532
Files:
clang/cmake/caches/Fuchsia-stage2.cmake
llvm/include/llvm/CMakeLists.txt
llvm/include/llvm/ProfileData/CMakeLists.txt
Index: llvm/include/llvm/ProfileData/CMakeLists.txt
===================================================================
--- /dev/null
+++ llvm/include/llvm/ProfileData/CMakeLists.txt
@@ -0,0 +1,12 @@
+add_custom_target(llvm-instr-prof-data-headers)
+
+install(FILES InstrProfData.inc
+ DESTINATION include/llvm/ProfileData
+ COMPONENT llvm-instr-prof-data-headers)
+
+add_custom_target(install-llvm-instr-prof-data-headers
+ DEPENDS llvm-instr-prof-data-headers
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT=llvm-instr-prof-data-headers
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+add_custom_target(install-llvm-instr-prof-data-headers-stripped DEPENDS install-llvm-instr-prof-data-headers)
Index: llvm/include/llvm/CMakeLists.txt
===================================================================
--- llvm/include/llvm/CMakeLists.txt
+++ llvm/include/llvm/CMakeLists.txt
@@ -1,5 +1,6 @@
add_subdirectory(IR)
add_subdirectory(Support)
+add_subdirectory(ProfileData)
# If we're doing an out-of-tree build, copy a module map for generated
# header files into the build area.
Index: clang/cmake/caches/Fuchsia-stage2.cmake
===================================================================
--- clang/cmake/caches/Fuchsia-stage2.cmake
+++ clang/cmake/caches/Fuchsia-stage2.cmake
@@ -193,6 +193,7 @@
CACHE STRING "")
set(LLVM_DISTRIBUTION_COMPONENTS
+ llvm-instr-prof-data-headers
clang
lld
LTO
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64532.209070.patch
Type: text/x-patch
Size: 1516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190710/d05878af/attachment.bin>
More information about the llvm-commits
mailing list