diff --git a/compiler-rt/include/CMakeLists.txt b/compiler-rt/include/CMakeLists.txt --- a/compiler-rt/include/CMakeLists.txt +++ b/compiler-rt/include/CMakeLists.txt @@ -84,10 +84,12 @@ 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