[PATCH] D52199: [profile] Install headers for custom runtime maintainers
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 17:28:49 PDT 2018
vsk created this revision.
vsk added reviewers: delcypher, beanz.
Herald added a subscriber: mgorny.
Some users maintain custom runtimes which provide support for
-fprofile-instr-generate instrumentation in non-standard environments
(e.g the kernel).
It may not be obvious which functions need to be implemented or what
their signatures are. Silent breakage is possible if the runtime's
internal interface changes.
This patch installs a few headers from the profiling runtime to serve as
a reference.
rdar://44375648
https://reviews.llvm.org/D52199
Files:
compiler-rt/cmake/Modules/AddCompilerRT.cmake
compiler-rt/lib/profile/CMakeLists.txt
Index: compiler-rt/lib/profile/CMakeLists.txt
===================================================================
--- compiler-rt/lib/profile/CMakeLists.txt
+++ compiler-rt/lib/profile/CMakeLists.txt
@@ -124,3 +124,7 @@
ADDITIONAL_HEADERS ${PROFILE_HEADERS}
PARENT_TARGET profile)
endif()
+
+add_compiler_rt_header(InstrProfiling.h profile)
+add_compiler_rt_header(InstrProfilingInternal.h profile)
+add_compiler_rt_header(InstrProfData.inc profile)
Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -485,6 +485,10 @@
set_target_properties(${target_name} PROPERTIES FOLDER "Compiler-RT Misc")
endmacro()
+function(add_compiler_rt_header file_name component)
+ add_compiler_rt_resource_file(${file_name} ${file_name} ${component})
+endfunction()
+
macro(add_compiler_rt_script name)
set(dst ${COMPILER_RT_EXEC_OUTPUT_DIR}/${name})
set(src ${CMAKE_CURRENT_SOURCE_DIR}/${name})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52199.165850.patch
Type: text/x-patch
Size: 1074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180918/f45906d9/attachment.bin>
More information about the llvm-commits
mailing list