[memprof] Respect COMPILER_RT_BUILD_MEMPROF when install memprof headers

When COMPILER_RT_BUILD_MEMPROF is disabled, the memprof headers should not be installed.

Reviewed By: mgorny, tejohnson

Differential Revision: https://reviews.llvm.org/D136550
This commit is contained in:
Enna1 2022-10-25 09:34:50 +08:00 committed by xumingjie.enna1
parent 1d31ea68c0
commit 345b0587a3
1 changed files with 6 additions and 4 deletions

View File

@ -84,10 +84,12 @@ install(FILES ${FUZZER_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)
if (COMPILER_RT_BUILD_MEMPROF)
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)
endif(COMPILER_RT_BUILD_MEMPROF)
# Install xray headers.
install(FILES ${XRAY_HEADERS}
COMPONENT compiler-rt-headers