Skip to content

Commit 345b058

Browse files
committed
[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
1 parent 1d31ea6 commit 345b058

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

compiler-rt/include/CMakeLists.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@ install(FILES ${FUZZER_HEADERS}
8484
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
8585
DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/fuzzer)
8686
# Install memprof headers.
87-
install(FILES sanitizer/memprof_interface.h
88-
COMPONENT compiler-rt-headers
89-
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
90-
DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/sanitizer)
87+
if (COMPILER_RT_BUILD_MEMPROF)
88+
install(FILES sanitizer/memprof_interface.h
89+
COMPONENT compiler-rt-headers
90+
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
91+
DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/sanitizer)
92+
endif(COMPILER_RT_BUILD_MEMPROF)
9193
# Install xray headers.
9294
install(FILES ${XRAY_HEADERS}
9395
COMPONENT compiler-rt-headers

0 commit comments

Comments
 (0)