Precommit: [profile] Install headers for custom runtime maintainers
@@ -24,9 +24,18 @@ if (COMPILER_RT_BUILD_XRAY)
)
endif(COMPILER_RT_BUILD_XRAY)
+if(COMPILER_RT_BUILD_PROFILE AND COMPILER_RT_HAS_PROFILE)
+ set(PROFILE_HEADERS
+ ../lib/profile/InstrProfiling.h
+ ../lib/profile/InstrProfilingInternal.h
+ ../lib/profile/InstrProfData.inc
+ )
+endif()
+
set(COMPILER_RT_HEADERS
${SANITIZER_HEADERS}
- ${XRAY_HEADERS})
+ ${XRAY_HEADERS}
+ ${PROFILE_HEADERS})
set(output_dir ${COMPILER_RT_OUTPUT_DIR}/include)
@@ -56,6 +65,11 @@ install(FILES ${XRAY_HEADERS}
COMPONENT compiler-rt-headers
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray)
+# Install profile headers.
+install(FILES ${PROFILE_HEADERS}
+ COMPONENT compiler-rt-headers
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/profile)
if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDEs.
add_custom_target(install-compiler-rt-headers
