[memprof] Support installation of memprof headers
authorEnna1 <xumingjie.enna1@bytedance.com>
Thu, 20 Oct 2022 12:30:08 +0000 (20:30 +0800)
committerEnna1 <xumingjie.enna1@bytedance.com>
Thu, 20 Oct 2022 12:31:45 +0000 (20:31 +0800)
This change allows users manually calling memprof public C API (e.g. __memprof_profile_dump).

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D136067

compiler-rt/include/CMakeLists.txt

index 5968cfd..9fb8b0d 100644 (file)
@@ -83,6 +83,11 @@ install(FILES ${FUZZER_HEADERS}
   COMPONENT compiler-rt-headers
   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
   DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/fuzzer)
+# Install memprof headers.
+install(FILES sanitizer/memprof_interface.h
+  COMPONENT compiler-rt-headers
+  PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+  DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/sanitizer)
 # Install xray headers.
 install(FILES ${XRAY_HEADERS}
   COMPONENT compiler-rt-headers